(* Content-type: application/mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 6.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       145,          7]
NotebookDataLength[    367448,       8378]
NotebookOptionsPosition[    344696,       7686]
NotebookOutlinePosition[    345174,       7704]
CellTagsIndexPosition[    345131,       7701]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["Components for Pneumatic Systems", "Title"],

Cell[CellGroupData[{

Cell["General", "Section",
 CellChangeTimes->{
  3.5353721004569864`*^9, {3.5353722238417835`*^9, 3.5353722289626513`*^9}, {
   3.5719987212556453`*^9, 3.5719987225816536`*^9}}],

Cell[BoxData[
 RowBox[{"<<", "C:\\\\Hopsan\\Compgen\\CompgenNG02.mx"}]], "Input",
 PageWidth->WindowWidth,
 CellChangeTimes->{{3.5039042069364696`*^9, 3.5039042084051447`*^9}, 
   3.5039043176026783`*^9, {3.503905207466113*^9, 3.5039052078411083`*^9}, {
   3.5039109774941587`*^9, 3.5039109827285337`*^9}, 3.51854719303125*^9, {
   3.520873875578125*^9, 3.520873903796875*^9}}],

Cell[BoxData[
 RowBox[{"Off", "[", 
  RowBox[{"General", "::", "\"\<spell1\>\""}], "]"}]], "Input",
 PageWidth->WindowWidth],

Cell[BoxData[
 RowBox[{
  RowBox[{"defaultPath", "=", 
   RowBox[{"ToFileName", "[", 
    RowBox[{"{", 
     RowBox[{
     "\"\<C:\>\"", ",", "\"\<HopsanTrunk\>\"", ",", "\"\<HOPSAN++\>\"", ",", 
      "\"\<ComponentLibraries\>\"", ",", "\"\<defaultLibrary\>\"", ",", 
      "\"\<Pneumatic\>\""}], "}"}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.5757727777685804`*^9, 3.575772792541806*^9}, {
   3.5757728423954945`*^9, 3.5757728498367076`*^9}, {3.57577333888545*^9, 
   3.5757733706315055`*^9}, 3.5757734316206255`*^9, {3.575776746610216*^9, 
   3.57577674854722*^9}}]
}, Closed]],

Cell[CellGroupData[{

Cell["Volume 2", "Section",
 CellChangeTimes->{
  3.5353721004569864`*^9, {3.5353722238417835`*^9, 3.5353722289626513`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Pneumatic\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<Volume2\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Pneumatic volume\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentC\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFilenames", "[", 
   RowBox[{"defaultPath", ",", "domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.53537005401182*^9, 3.5353700749665146`*^9}, 
   3.5757768067385716`*^9}],

Cell[BoxData[
 RowBox[{"ka", "=."}]], "Input",
 CellChangeTimes->{{3.5685222861784153`*^9, 3.568522287312415*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", "  ", "=", " ", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{
     "mass", ",", "0.001", ",", "double", ",", "\"\<kg\>\"", ",", 
      "\"\<Mass in volume\>\""}], "}"}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535370104846068*^9, 3.535370110494318*^9}, {
  3.535370314418211*^9, 3.5353703208038054`*^9}, {3.535458829959422*^9, 
  3.535458830287555*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "V", ",", "0.001", ",", "double", ",", "\"\<m3\>\"", ",", 
       "\"\<Volume\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "R", ",", "287.", ",", "double", ",", "\"\<J/Kg K\>\"", ",", 
       "\"\<Gas constant\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "cv", ",", "718.", ",", "double", ",", "\"\<J/Kg K\>\"", ",", 
       "\"\<heatcoeff\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "ka", ",", "0.", ",", "double", ",", "\"\<J/Ks\>\"", ",", 
       "\"\<heat conductance\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "T0", ",", "300.", ",", "double", ",", "\"\<K\>\"", ",", 
       "\"\<Outside temperature\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "alpha", ",", "0.1", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<numerical damping\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "pmin", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<numerical min pressure\>\""}], "}"}]}], "\n", "\t\t", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.5353703270176597`*^9, 3.535370334183889*^9}, {
  3.568449074163356*^9, 3.568449076163355*^9}, {3.568451365855424*^9, 
  3.5684513868785257`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"portConnections", "=", 
   RowBox[{"{", "\[IndentingNewLine]", "\t", 
    RowBox[{
     RowBox[{"PneumaticCport", "[", 
      RowBox[{"p1", ",", "100000.", ",", "\"\<fluid port 1\>\"", ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0.5", ",", "270"}], "}"}]}], "]"}], ",", 
     "\[IndentingNewLine]", "\t", 
     RowBox[{"PneumaticCport", "[", 
      RowBox[{"p2", ",", "100000.", ",", "\"\<fluid port 2\>\"", ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0.5", ",", "90"}], "}"}]}], "]"}]}], "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.4458567530827656`*^9, 3.445856805848053*^9}, {
  3.516293489375*^9, 3.516293499125*^9}, {3.535541977*^9, 
  3.535541991625*^9}, {3.535542208609375*^9, 3.5355422090625*^9}, {
  3.535542381671875*^9, 3.535542392828125*^9}, {3.5684503752639694`*^9, 
  3.568450377478191*^9}, {3.5721614844077215`*^9, 3.5721614913734183`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"nodeConnections", "=", 
   RowBox[{"{", "\[IndentingNewLine]", "\t", 
    RowBox[{
     RowBox[{"PneumaticCnode", "[", 
      RowBox[{"p1", ",", "100000.", ",", "\"\<fluid port 1\>\""}], "]"}], ",",
      "\[IndentingNewLine]", "\t", 
     RowBox[{"PneumaticCnode", "[", 
      RowBox[{"p2", ",", "100000.", ",", "\"\<fluid port 2\>\""}], "]"}]}], 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.4458567530827656`*^9, 3.445856805848053*^9}, {
  3.516293489375*^9, 3.516293499125*^9}, {3.535541977*^9, 
  3.535541991625*^9}, {3.535542208609375*^9, 3.5355422090625*^9}, {
  3.535542381671875*^9, 3.535542392828125*^9}, {3.5684503752639694`*^9, 
  3.568450377478191*^9}, {3.5684509832627635`*^9, 3.5684509970240593`*^9}, {
  3.5684511449390593`*^9, 3.568451145238059*^9}, {3.5721614930495863`*^9, 
  3.572161494468728*^9}}],

Cell["\<\
qmp1 = qp1;
qmp2 = qp2;\
\>", "Text",
 CellChangeTimes->{{3.5685212396426315`*^9, 3.56852125718814*^9}, 
   3.5720004641798134`*^9}],

Cell[CellGroupData[{

Cell["Pressure and temperature", "Subsection"],

Cell[CellGroupData[{

Cell["Definition of rules", "Subsubsection"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Unprotect", "[", "D", "]"}], ";"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"x_", "  ", "y_"}], ",", "t_"}], "]"}], ":=", 
   RowBox[{
    RowBox[{
     RowBox[{"D", "[", 
      RowBox[{"x", ",", "t"}], "]"}], "y"}], "+", 
    RowBox[{"x", " ", 
     RowBox[{"D", "[", " ", 
      RowBox[{"y", ",", "t"}], "]"}]}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"x_", " ", "/", "y_"}], ",", "t_"}], "]"}], ":=", 
   RowBox[{
    RowBox[{
     RowBox[{"D", "[", 
      RowBox[{"x", ",", "t"}], "]"}], "/", "y"}], "-", 
    RowBox[{"x", " ", 
     RowBox[{
      RowBox[{"D", "[", " ", 
       RowBox[{"y", ",", "t"}], "]"}], "/", 
      RowBox[{"y", "^", "2"}]}]}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"x_", "+", "y_"}], ",", "t_"}], "]"}], ":=", 
   RowBox[{
    RowBox[{"D", "[", 
     RowBox[{"x", ",", "t"}], "]"}], "+", 
    RowBox[{"D", "[", 
     RowBox[{"y", ",", "t"}], "]"}]}]}], ";"}]}], "Input"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"p", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"dotv", " ", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"U", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"H", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"dotU", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"T", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"dotv", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Tav", "=."}], ";"}]}], "Input"],

Cell[BoxData[
 RowBox[{" ", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "m"}], "=", " ", "qm"}], "  ", 
    ";"}], "\n", 
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "p"}], " ", "=", " ", "dotp"}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "v"}], " ", "=", " ", "dotv"}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "T"}], " ", "=", " ", "dotT"}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "U"}], "=", " ", "dotU"}], ";"}],
    "\n", 
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "H"}], "=", " ", "dotH"}], 
    ";"}]}]}]], "Input"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Equations", "Subsection"],

Cell[BoxData[
 RowBox[{
  RowBox[{"eqp", " ", "=", " ", 
   RowBox[{"p", " ", "==", " ", 
    FractionBox[
     RowBox[{"mass", " ", "R", " ", "T"}], "V"]}]}], ";"}]], "Input",
 CellChangeTimes->{3.535458850131813*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"eqU", " ", "=", " ", 
   RowBox[{"U", " ", "==", " ", 
    RowBox[{"mass", " ", "cv", " ", "T"}]}]}], ";"}]], "Input",
 CellChangeTimes->{3.535458851741229*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"eqH", " ", "=", " ", 
   RowBox[{"H", " ", "==", " ", 
    RowBox[{"U", " ", "+", "  ", 
     RowBox[{"p", " ", "V"}]}]}]}], ";"}]], "Input"],

Cell[BoxData[
 FormBox[
  RowBox[{"H", "=", 
   RowBox[{"m", " ", "T", 
    RowBox[{"(", 
     RowBox[{
      SubscriptBox["c", "v"], " ", "+", " ", "R"}], ")"}]}]}], 
  TextForm]], "DisplayFormula"],

Cell[CellGroupData[{

Cell[BoxData["T"], "Input",
 CellChangeTimes->{3.535376178078125*^9}],

Cell[BoxData["T"], "Output",
 CellChangeTimes->{
  3.53537617896875*^9, 3.53537643790625*^9, 3.535396337234375*^9, 
   3.5353963794375*^9, 3.5353964519375*^9, 3.535455425624792*^9, 
   3.5354581235875845`*^9, 3.535458228601923*^9, 3.535458912726676*^9, 
   3.53552598378125*^9, 3.5355263970625*^9, 3.53552646228125*^9, 
   3.535526583453125*^9, 3.535526702921875*^9, 3.5355411041875*^9, 
   3.568446773642931*^9, 3.568449494431532*^9, 3.5684505247469163`*^9, 
   3.5684505798214235`*^9, 3.5684506840878487`*^9, 3.568451031075059*^9, 
   3.568451061855059*^9, 3.568451202913059*^9, 3.568454858262644*^9, 
   3.568456820307838*^9, 3.5684574515738363`*^9, 3.568458839806777*^9, 
   3.5684589726270576`*^9, 3.5684590543882327`*^9, 3.5685213297233353`*^9, 
   3.5685221871174154`*^9, 3.5685223070394154`*^9, 3.571999395706291*^9, 
   3.5720003683651104`*^9, 3.5720004980476303`*^9, 3.572000552629672*^9, 
   3.5720038989114203`*^9, 3.5720050603895273`*^9, 3.5720086344513865`*^9, 
   3.5720092453474703`*^9, 3.5721611688981743`*^9, 3.5721614588511667`*^9, 
   3.5721616721834974`*^9, 3.572167675321789*^9, 3.5721679960798616`*^9, 
   3.5721737443466496`*^9, 3.572174176445855*^9, {3.575776912721765*^9, 
   3.5757769354839153`*^9}, {3.575777021552255*^9, 3.5757770288898478`*^9}, 
   3.5757998706818995`*^9, 3.5774506219592457`*^9, 3.57745065781083*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqT", " ", "=", " ", 
  RowBox[{"T", "==", " ", 
   FractionBox[
    RowBox[{"U", " ", "+", "  ", 
     RowBox[{"p", " ", "V"}]}], 
    RowBox[{"mass", 
     RowBox[{"(", 
      RowBox[{"cv", " ", "+", " ", "R"}], ")"}]}]]}]}]], "Input",
 CellChangeTimes->{3.535458858491402*^9}],

Cell[BoxData[
 RowBox[{"T", "\[Equal]", 
  FractionBox[
   RowBox[{"U", "+", 
    RowBox[{"p", " ", "V"}]}], 
   RowBox[{"mass", " ", 
    RowBox[{"(", 
     RowBox[{"cv", "+", "R"}], ")"}]}]]}]], "Output",
 CellChangeTimes->{
  3.4458594457448225`*^9, 3.44586008367824*^9, {3.445860217271135*^9, 
   3.4458602246460876`*^9}, 3.4458613129516225`*^9, 3.445861579059294*^9, 
   3.535372461760236*^9, 3.535376183203125*^9, 3.535376438015625*^9, 
   3.53539633784375*^9, 3.5353963795*^9, 3.535396452*^9, 3.535455425656041*^9,
    3.5354581236032095`*^9, 3.535458228617548*^9, 3.535458912742301*^9, 
   3.535525983859375*^9, 3.535526397171875*^9, 3.535526462375*^9, 
   3.535526583546875*^9, 3.535526703046875*^9, 3.53554110428125*^9, 
   3.568446773725931*^9, 3.568449494484543*^9, 3.5684505247799196`*^9, 
   3.568450579858427*^9, 3.5684506841258526`*^9, 3.5684510311090593`*^9, 
   3.5684510618970594`*^9, 3.568451202948059*^9, 3.568454858308648*^9, 
   3.568456820440851*^9, 3.568457451616836*^9, 3.568458839847781*^9, 
   3.568458972663061*^9, 3.5684590544242363`*^9, 3.5685213297473383`*^9, 
   3.5685221871454153`*^9, 3.568522307083415*^9, 3.571999395737494*^9, 
   3.5720003683963103`*^9, 3.5720004980788307`*^9, 3.572000552660872*^9, 
   3.57200389892702*^9, 3.5720050604207277`*^9, 3.5720086344823895`*^9, 
   3.5720092453834734`*^9, 3.5721611689241767`*^9, 3.5721614588761687`*^9, 
   3.5721616722145004`*^9, 3.5721676753487916`*^9, 3.572167996105864*^9, 
   3.5721737443746524`*^9, 3.5721741764688573`*^9, {3.5757769127373767`*^9, 
   3.575776935499527*^9}, {3.575777021583479*^9, 3.57577702890546*^9}, 
   3.5757998707099*^9, 3.5774506220182514`*^9, 3.577450657834833*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqdotp", " ", "=", 
  RowBox[{
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"eqp", "[", 
      RowBox[{"[", "1", "]"}], "]"}], ",", "t"}], "]"}], "==", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"eqp", "[", 
      RowBox[{"[", "2", "]"}], "]"}], ",", "t"}], "]"}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{"dotp", "\[Equal]", 
  FractionBox[
   RowBox[{"dotT", " ", "mass", " ", "R"}], "V"]}]], "Output",
 CellChangeTimes->{
  3.445859445807322*^9, 3.445860083756364*^9, {3.4458602173492594`*^9, 
   3.4458602247398367`*^9}, 3.445861313014122*^9, 3.4458615791061687`*^9, 
   3.535372462181816*^9, 3.535376191640625*^9, 3.535376438109375*^9, 
   3.53539633828125*^9, 3.535396379546875*^9, 3.535396452078125*^9, 
   3.5354554256716657`*^9, 3.5354581236188345`*^9, 3.5354582286331725`*^9, 
   3.535458912773551*^9, 3.5355259839375*^9, 3.535526397265625*^9, 
   3.53552646246875*^9, 3.535526583640625*^9, 3.53552670375*^9, 
   3.53554110440625*^9, 3.568446773755931*^9, 3.568449494533552*^9, 
   3.568450524813923*^9, 3.568450579896431*^9, 3.5684506841708574`*^9, 
   3.568451031137059*^9, 3.5684510619320593`*^9, 3.5684512029850593`*^9, 
   3.5684548583816557`*^9, 3.5684568204858556`*^9, 3.568457451662836*^9, 
   3.5684588398917856`*^9, 3.568458972703065*^9, 3.5684590544562397`*^9, 
   3.568521329799343*^9, 3.5685221871784153`*^9, 3.5685223071104155`*^9, 
   3.571999395768697*^9, 3.57200036841191*^9, 3.572000498110031*^9, 
   3.5720005526920724`*^9, 3.5720038989582205`*^9, 3.572005060436328*^9, 
   3.5720086345203934`*^9, 3.572009245416477*^9, 3.57216116896218*^9, 
   3.5721614589011717`*^9, 3.5721616722355027`*^9, 3.572167675372794*^9, 
   3.5721679961318665`*^9, 3.572173744402655*^9, 3.5721741764918594`*^9, {
   3.575776912752989*^9, 3.575776935515139*^9}, {3.5757770215990906`*^9, 
   3.575777028921072*^9}, 3.5757998707398996`*^9, 3.5774506220592556`*^9, 
   3.577450657859835*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqdotS", " ", "=", " ", 
  RowBox[{"dotU", " ", "==", " ", 
   RowBox[{
    RowBox[{"dotSq", " ", "T"}], " ", "+", " ", 
    RowBox[{"dotSew", " ", "T"}]}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{"dotU", "\[Equal]", 
  RowBox[{
   RowBox[{"dotSew", " ", "T"}], "+", 
   RowBox[{"dotSq", " ", "T"}]}]}]], "Output",
 CellChangeTimes->{
  3.4458594458854465`*^9, 3.445860083834489*^9, {3.445860217411759*^9, 
   3.4458602248179617`*^9}, 3.4458613130609965`*^9, 3.4458615791686687`*^9, 
   3.5353724622442727`*^9, 3.535376200390625*^9, 3.53537644465625*^9, 
   3.535396338390625*^9, 3.535396379609375*^9, 3.535396452140625*^9, 
   3.53545542568729*^9, 3.5354581236500845`*^9, 3.535458228648797*^9, 
   3.5354589127891755`*^9, 3.535525984015625*^9, 3.535526397921875*^9, 
   3.535526463125*^9, 3.53552658425*^9, 3.535526703890625*^9, 
   3.535541105140625*^9, 3.568446773812931*^9, 3.568449494581562*^9, 
   3.568450524849927*^9, 3.5684505799334345`*^9, 3.568450684210861*^9, 
   3.568451031177059*^9, 3.5684510619630594`*^9, 3.568451203013059*^9, 
   3.568454858413659*^9, 3.568456820544862*^9, 3.568457451703836*^9, 
   3.5684588399487915`*^9, 3.5684589727450695`*^9, 3.568459054490243*^9, 
   3.5685213298233457`*^9, 3.568522187203415*^9, 3.568522307153415*^9, 
   3.571999395784298*^9, 3.5720003684431105`*^9, 3.5720004981412306`*^9, 
   3.5720005527232723`*^9, 3.5720038989738207`*^9, 3.5720050604675283`*^9, 
   3.572008634564398*^9, 3.57200924544848*^9, 3.5721611689871826`*^9, 
   3.572161458928174*^9, 3.5721616722535048`*^9, 3.572167675396796*^9, 
   3.5721679961578693`*^9, 3.572173744431658*^9, 3.572174176514862*^9, {
   3.5757769127842126`*^9, 3.575776935546363*^9}, {3.575777021630315*^9, 
   3.5757770289522953`*^9}, 3.5757998707709*^9, 3.577450622111261*^9, 
   3.577450657885838*^9}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"dotUq", " ", "=", "   ", 
   RowBox[{"qm", " ", "cv", " ", "Tin"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"DotUew", " ", "=", " ", 
   RowBox[{"p", " ", "qv"}]}], ";"}]}], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqdotU", " ", "=", " ", 
  RowBox[{"dotE", " ", "==", " ", 
   RowBox[{"dotUq", " ", "+", " ", "dotUew"}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{"dotE", "\[Equal]", 
  RowBox[{"dotUew", "+", 
   RowBox[{"cv", " ", "qm", " ", "Tin"}]}]}]], "Output",
 CellChangeTimes->{
  3.4458594460573206`*^9, 3.445860083928238*^9, {3.4458602175055084`*^9, 
   3.4458602249117107`*^9}, 3.445861313139121*^9, 3.445861579231168*^9, 
   3.5353724623379574`*^9, 3.535376200890625*^9, 3.535376444828125*^9, 
   3.535396338515625*^9, 3.53539637975*^9, 3.535396452234375*^9, 
   3.5354554257185397`*^9, 3.535458123681334*^9, 3.535458228680047*^9, 
   3.5354589128204255`*^9, 3.53552598446875*^9, 3.5355263980625*^9, 
   3.53552646325*^9, 3.535526584375*^9, 3.53552670403125*^9, 
   3.535541105296875*^9, 3.568446773884931*^9, 3.5684494946335726`*^9, 
   3.5684505248919306`*^9, 3.56845057998944*^9, 3.5684506842548656`*^9, 
   3.568451031231059*^9, 3.568451062028059*^9, 3.5684512030570593`*^9, 
   3.568454858484666*^9, 3.5684568206138687`*^9, 3.568457451775836*^9, 
   3.568458839998796*^9, 3.5684589728170767`*^9, 3.568459054538248*^9, 
   3.56852132986735*^9, 3.568522187267415*^9, 3.5685223071884155`*^9, 
   3.5719993958311024`*^9, 3.572000368489911*^9, 3.572000498188031*^9, 
   3.572000552848073*^9, 3.572003899005021*^9, 3.5720050604987288`*^9, 
   3.5720086346114025`*^9, 3.572009245487484*^9, 3.5721611690231867`*^9, 
   3.5721614589631777`*^9, 3.572161672279507*^9, 3.5721676754318*^9, 
   3.5721679961918726`*^9, 3.5721737444686613`*^9, 3.5721741765468655`*^9, {
   3.5757769128154364`*^9, 3.5757769355619745`*^9}, {3.575777021661538*^9, 
   3.5757770289835196`*^9}, 3.5757998708068995`*^9, 3.577450622160266*^9, 
   3.5774506579188414`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["dotU"], "Input"],

Cell[BoxData["dotU"], "Output",
 CellChangeTimes->{
  3.445859446135445*^9, 3.445860084006363*^9, {3.4458602175836325`*^9, 
   3.4458602249898353`*^9}, 3.445861313185996*^9, 3.445861579293668*^9, 
   3.535372462400414*^9, 3.53537620096875*^9, 3.535376444921875*^9, 
   3.535396338609375*^9, 3.535396379828125*^9, 3.5353964523125*^9, 
   3.535455425734164*^9, 3.535458123696959*^9, 3.535458228695671*^9, 
   3.5354589128360505`*^9, 3.53552598453125*^9, 3.535526398140625*^9, 
   3.535526463328125*^9, 3.535526584484375*^9, 3.535526704125*^9, 
   3.53554110540625*^9, 3.5684467739319315`*^9, 3.568449494681582*^9, 
   3.5684505249249344`*^9, 3.5684505800294437`*^9, 3.5684506843048706`*^9, 
   3.568451031275059*^9, 3.5684510620690594`*^9, 3.568451203086059*^9, 
   3.5684548585196695`*^9, 3.568456820648872*^9, 3.5684574518318357`*^9, 
   3.5684588400508013`*^9, 3.568458972863081*^9, 3.5684590545742517`*^9, 
   3.5685213298913527`*^9, 3.5685221872974153`*^9, 3.568522307246415*^9, 
   3.571999395862305*^9, 3.5720003685211115`*^9, 3.5720004982192316`*^9, 
   3.572000552910474*^9, 3.5720038990362215`*^9, 3.5720050605299287`*^9, 
   3.5720086346424055`*^9, 3.5720092455174875`*^9, 3.572161169048189*^9, 
   3.5721614589871798`*^9, 3.5721616722985086`*^9, 3.5721676754548025`*^9, 
   3.572167996216875*^9, 3.5721737444976645`*^9, 3.5721741765698676`*^9, {
   3.5757769128310485`*^9, 3.5757769355931983`*^9}, {3.5757770216771507`*^9, 
   3.575777028999131*^9}, 3.5757998708438997`*^9, 3.577450622194269*^9, 
   3.5774506579428434`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{" ", 
  RowBox[{"dotU", " ", "=", 
   RowBox[{"dotE", "-", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"p", " ", "V"}], ",", "t"}], "]"}]}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{"dotE", "-", 
  RowBox[{"dotp", " ", "V"}]}]], "Output",
 CellChangeTimes->{
  3.4458594461979446`*^9, 3.4458600841782365`*^9, {3.445860217708632*^9, 
   3.44586022506796*^9}, 3.445861313248495*^9, 3.4458615793405423`*^9, 
   3.5353724624628706`*^9, 3.5353762010625*^9, 3.53537644503125*^9, 
   3.535396338703125*^9, 3.5353963799375*^9, 3.535396452375*^9, 
   3.5354554257654133`*^9, 3.535458123712584*^9, 3.535458228726921*^9, 
   3.535458912851675*^9, 3.535525984640625*^9, 3.535526398234375*^9, 
   3.535526463421875*^9, 3.535526584578125*^9, 3.53552670421875*^9, 
   3.535541106140625*^9, 3.568446773989931*^9, 3.5684494947235904`*^9, 
   3.5684505249609375`*^9, 3.5684505800594473`*^9, 3.5684506843348737`*^9, 
   3.5684510313200593`*^9, 3.5684510621030593`*^9, 3.568451203119059*^9, 
   3.5684548585556726`*^9, 3.5684568207148786`*^9, 3.568457451875836*^9, 
   3.5684588400948057`*^9, 3.5684589729070854`*^9, 3.568459054612255*^9, 
   3.5685213299343567`*^9, 3.5685221873554153`*^9, 3.5685223072974153`*^9, 
   3.571999395893508*^9, 3.5720003685523114`*^9, 3.5720004982504315`*^9, 
   3.572000552941674*^9, 3.572003899051821*^9, 3.572005060545529*^9, 
   3.5720086346704082`*^9, 3.57200924554749*^9, 3.5721611690741916`*^9, 
   3.5721614590131826`*^9, 3.572161672316511*^9, 3.572167675481805*^9, 
   3.572167996242878*^9, 3.5721737445266676`*^9, 3.57217417659387*^9, {
   3.57577691284666*^9, 3.5757769356088104`*^9}, {3.575777021708374*^9, 
   3.5757770290303555`*^9}, 3.5757998708698997`*^9, 3.5774506222282724`*^9, 
   3.577450657966846*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"qv", " ", "=", " ", 
  RowBox[{"qm", " ", "R", " ", 
   RowBox[{"Tin", "/", "p"}]}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"qm", " ", "R", " ", "Tin"}], "p"]], "Output",
 CellChangeTimes->{
  3.445859446260444*^9, 3.445860084256361*^9, {3.4458602177867565`*^9, 
   3.4458602251304593`*^9}, 3.44586131329537*^9, 3.4458615793874173`*^9, 
   3.5353724625253267`*^9, 3.53537620115625*^9, 3.535376445125*^9, 
   3.535396338796875*^9, 3.53539638034375*^9, 3.53539645271875*^9, 
   3.5354554257810383`*^9, 3.5354581237438335`*^9, 3.5354582287425456`*^9, 
   3.535458912882925*^9, 3.53552598471875*^9, 3.535526398328125*^9, 
   3.535526463515625*^9, 3.535526584671875*^9, 3.5355267043125*^9, 
   3.535541106234375*^9, 3.568446774045931*^9, 3.5684494947685995`*^9, 
   3.568450524992941*^9, 3.56845058009245*^9, 3.5684506843808784`*^9, 
   3.5684510313470592`*^9, 3.568451062138059*^9, 3.568451203146059*^9, 
   3.568454858596677*^9, 3.568456820769884*^9, 3.568457451916836*^9, 
   3.5684588401518116`*^9, 3.568458972963091*^9, 3.5684590546422586`*^9, 
   3.5685213299613595`*^9, 3.568522187403415*^9, 3.568522307324415*^9, 
   3.5719993959247108`*^9, 3.5720003685835114`*^9, 3.5720004982816315`*^9, 
   3.5720005529728737`*^9, 3.572003899083021*^9, 3.572005060576729*^9, 
   3.5720086347104125`*^9, 3.572009245578493*^9, 3.572161169100194*^9, 
   3.572161459036185*^9, 3.5721616723345127`*^9, 3.5721676755078077`*^9, 
   3.5721679962698803`*^9, 3.5721737445556707`*^9, 3.5721741766188726`*^9, {
   3.575776912877884*^9, 3.575776935624422*^9}, {3.5757770217395983`*^9, 
   3.575777029045967*^9}, 3.5757998708998995`*^9, 3.577450622263276*^9, 
   3.5774506579918485`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqH", "[", 
  RowBox[{"[", "2", "]"}], "]"}]], "Input",
 CellChangeTimes->{{3.535376292203125*^9, 3.535376293234375*^9}}],

Cell[BoxData[
 RowBox[{"U", "+", 
  RowBox[{"p", " ", "V"}]}]], "Output",
 CellChangeTimes->{{3.535376284734375*^9, 3.535376293875*^9}, 
   3.535376451671875*^9, 3.53539633890625*^9, 3.535396380421875*^9, 
   3.5353964528125*^9, 3.5354554257966623`*^9, 3.5354581237594585`*^9, 
   3.53545822875817*^9, 3.53545891289855*^9, 3.535525984796875*^9, 
   3.53552639896875*^9, 3.53552646415625*^9, 3.535526585296875*^9, 
   3.53552670440625*^9, 3.5355411063125*^9, 3.5684467740919313`*^9, 
   3.5684494947936044`*^9, 3.5684505250199437`*^9, 3.568450580127454*^9, 
   3.5684506844348836`*^9, 3.568451031388059*^9, 3.5684510621690593`*^9, 
   3.5684512031760592`*^9, 3.568454858632681*^9, 3.568456820835891*^9, 
   3.568457451959836*^9, 3.568458840196816*^9, 3.568458973002095*^9, 
   3.568459054677262*^9, 3.5685213300023637`*^9, 3.5685221874684153`*^9, 
   3.5685223073814154`*^9, 3.5719993959559135`*^9, 3.5720003686147118`*^9, 
   3.572000498312832*^9, 3.572000553004074*^9, 3.5720038990986214`*^9, 
   3.572005060607929*^9, 3.572008634746416*^9, 3.572009245606496*^9, 
   3.5721611691251965`*^9, 3.572161459059187*^9, 3.5721616723535147`*^9, 
   3.57216767553181*^9, 3.572167996302884*^9, 3.5721737445856733`*^9, 
   3.572174176644875*^9, {3.575776912893496*^9, 3.5757769356556463`*^9}, {
   3.57577702175521*^9, 3.575777029077191*^9}, 3.5757998709248996`*^9, 
   3.5774506222992797`*^9, 3.577450658015851*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqdotT", " ", "=", " ", 
  RowBox[{"dotT", " ", "==", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"eqH", "[", 
       RowBox[{"[", "2", "]"}], "]"}], "/", 
      RowBox[{"(", 
       RowBox[{"mass", " ", 
        RowBox[{"(", 
         RowBox[{"cv", "+", "R"}], ")"}]}], ")"}]}], ",", "t"}], 
    "]"}]}]}]], "Input",
 CellChangeTimes->{3.5354588608508377`*^9}],

Cell[BoxData[
 RowBox[{"dotT", "\[Equal]", 
  FractionBox["dotE", 
   RowBox[{"mass", " ", 
    RowBox[{"(", 
     RowBox[{"cv", "+", "R"}], ")"}]}]]}]], "Output",
 CellChangeTimes->{
  3.4458594463385687`*^9, 3.44586008435011*^9, {3.4458602178648806`*^9, 
   3.445860225208584*^9}, 3.4458613133734946`*^9, 3.445861579449917*^9, 
   3.535372462619011*^9, 3.535376205578125*^9, 3.535376451765625*^9, 
   3.535396339265625*^9, 3.5353963805*^9, 3.535396452875*^9, 
   3.5354554258122873`*^9, 3.5354581237907085`*^9, 3.5354582287894197`*^9, 
   3.535458912914175*^9, 3.535525984875*^9, 3.5355263990625*^9, 
   3.53552646425*^9, 3.535526585390625*^9, 3.535526704515625*^9, 
   3.53554110640625*^9, 3.5684467741649313`*^9, 3.568449494834613*^9, 
   3.5684505250539474`*^9, 3.5684505801644573`*^9, 3.5684506845028906`*^9, 
   3.568451031436059*^9, 3.568451062204059*^9, 3.568451203205059*^9, 
   3.5684548586746845`*^9, 3.568456820867894*^9, 3.568457452016836*^9, 
   3.5684588402438207`*^9, 3.568458973038099*^9, 3.568459054711265*^9, 
   3.568521330028366*^9, 3.568522187524415*^9, 3.5685223074224153`*^9, 
   3.5719993959871163`*^9, 3.572000368630312*^9, 3.5720004983440323`*^9, 
   3.5720005530352745`*^9, 3.572003899129822*^9, 3.5720050606235294`*^9, 
   3.5720086347794194`*^9, 3.572009245633499*^9, 3.572161169150199*^9, 
   3.5721614590831895`*^9, 3.572161672373516*^9, 3.5721676755568123`*^9, 
   3.5721679963278866`*^9, 3.5721737446146765`*^9, 3.5721741766698775`*^9, {
   3.57577691292472*^9, 3.575776935671258*^9}, {3.5757770217708216`*^9, 
   3.575777029092803*^9}, 3.5757998709518995`*^9, 3.577450622334283*^9, 
   3.5774506580408535`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Solving the quations", "Subsection"],

Cell[BoxData[
 RowBox[{
  RowBox[{"dotV", "=."}], ";"}]], "Input"],

Cell["The system of equations", "Text"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"eqdotp", ",", "eqp", ",", "eqU"}], "}"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"dotp", "\[Equal]", 
    FractionBox[
     RowBox[{"dotT", " ", "mass", " ", "R"}], "V"]}], ",", 
   RowBox[{"p", "\[Equal]", 
    FractionBox[
     RowBox[{"mass", " ", "R", " ", "T"}], "V"]}], ",", 
   RowBox[{"U", "\[Equal]", 
    RowBox[{"cv", " ", "mass", " ", "T"}]}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.445859446416693*^9, 3.445860084428235*^9, {3.4458602019587326`*^9, 
   3.4458602252867084`*^9}, 3.445861313435994*^9, 3.4458615794967914`*^9, 
   3.5353724626970816`*^9, 3.535376326046875*^9, 3.535376458140625*^9, 
   3.535396339390625*^9, 3.53539638059375*^9, 3.53539645296875*^9, 
   3.5354554258435364`*^9, 3.5354581238063335`*^9, 3.535458228805044*^9, 
   3.535458912945425*^9, 3.535525985015625*^9, 3.5355263991875*^9, 
   3.535526464375*^9, 3.535526585515625*^9, 3.535526704640625*^9, 
   3.535541107125*^9, 3.568446774229931*^9, 3.568449494891624*^9, 
   3.5684505250969515`*^9, 3.5684505802234635`*^9, 3.568450684548895*^9, 
   3.5684510314770594`*^9, 3.568451062252059*^9, 3.568451203247059*^9, 
   3.5684548587246895`*^9, 3.5684568211619234`*^9, 3.568457452070836*^9, 
   3.5684588403088274`*^9, 3.568458973090104*^9, 3.568459054750269*^9, 
   3.56852133006837*^9, 3.5685221875664153`*^9, 3.568522307458415*^9, 
   3.571999396018319*^9, 3.572000368677112*^9, 3.5720004983752327`*^9, 
   3.572000553082075*^9, 3.572003899161022*^9, 3.5720050606547294`*^9, 
   3.5720086348184233`*^9, 3.572009245668502*^9, 3.572161169188203*^9, 
   3.572161459114193*^9, 3.572161672398519*^9, 3.5721676755898156`*^9, 
   3.5721679963638897`*^9, 3.57217374465268*^9, 3.5721741767118816`*^9, {
   3.5757769129403315`*^9, 3.5757769357024817`*^9}, {3.5757770218176575`*^9, 
   3.5757770291240263`*^9}, 3.5757998709918995`*^9, 3.577450622389289*^9, 
   3.5774506580838575`*^9}]
}, Open  ]],

Cell["Solving for dotp,dotT,m, and U", "Text"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"eqdotp", ",", "eqp", ",", "eqdotS"}], "}"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"dotp", "\[Equal]", 
    FractionBox[
     RowBox[{"dotT", " ", "mass", " ", "R"}], "V"]}], ",", 
   RowBox[{"p", "\[Equal]", 
    FractionBox[
     RowBox[{"mass", " ", "R", " ", "T"}], "V"]}], ",", 
   RowBox[{
    RowBox[{"dotE", "-", 
     RowBox[{"dotp", " ", "V"}]}], "\[Equal]", 
    RowBox[{
     RowBox[{"dotSew", " ", "T"}], "+", 
     RowBox[{"dotSq", " ", "T"}]}]}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.4458594464791927`*^9, 3.445860084506359*^9, {3.4458602020524817`*^9, 
   3.445860225364833*^9}, 3.445861313482869*^9, 3.445861579559291*^9, 
   3.535372462759538*^9, 3.535376458265625*^9, 3.535396339484375*^9, 
   3.535396380671875*^9, 3.535396453046875*^9, 3.535455425859161*^9, 
   3.5354581238375835`*^9, 3.535458228820669*^9, 3.5354589129610496`*^9, 
   3.535525985078125*^9, 3.53552639928125*^9, 3.535526464453125*^9, 
   3.535526585609375*^9, 3.535526704734375*^9, 3.535541107203125*^9, 
   3.568446774491931*^9, 3.568449494936633*^9, 3.5684505251369553`*^9, 
   3.568450580268468*^9, 3.568450684579898*^9, 3.5684510315220594`*^9, 
   3.568451062297059*^9, 3.568451203282059*^9, 3.5684548587626934`*^9, 
   3.5684568212079277`*^9, 3.568457452115836*^9, 3.5684588403618326`*^9, 
   3.5684589731351085`*^9, 3.568459054798274*^9, 3.5685213300943727`*^9, 
   3.568522187611415*^9, 3.568522307515415*^9, 3.571999396049522*^9, 
   3.5720003686927123`*^9, 3.5720004984064326`*^9, 3.572000553113275*^9, 
   3.572003899176622*^9, 3.5720050606859293`*^9, 3.5720086348494263`*^9, 
   3.572009245695505*^9, 3.5721611692152057`*^9, 3.572161459137195*^9, 
   3.572161672416521*^9, 3.572167675613818*^9, 3.572167996391893*^9, 
   3.572173744681683*^9, 3.5721741767388844`*^9, {3.5757769129715557`*^9, 
   3.575776935718094*^9}, {3.575777021833269*^9, 3.5757770291396384`*^9}, 
   3.5757998710198994`*^9, 3.577450622425292*^9, 3.577450658119861*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqs", " ", "=", " ", 
  RowBox[{"Simplify", "[", 
   RowBox[{"Solve", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"eqdotp", ",", "eqdotT", ",", "eqp", ",", "eqU"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"dotp", ",", "dotT", ",", "mass", ",", "U"}], "}"}]}], "]"}], 
   "]"}]}]], "Input",
 CellChangeTimes->{3.535458868210401*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"dotp", "\[Rule]", 
     FractionBox[
      RowBox[{"dotE", " ", "R"}], 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]}], ",", 
    RowBox[{"dotT", "\[Rule]", 
     FractionBox[
      RowBox[{"dotE", " ", "R", " ", "T"}], 
      RowBox[{
       RowBox[{"cv", " ", "p", " ", "V"}], "+", 
       RowBox[{"p", " ", "R", " ", "V"}]}]]}], ",", 
    RowBox[{"mass", "\[Rule]", 
     FractionBox[
      RowBox[{"p", " ", "V"}], 
      RowBox[{"R", " ", "T"}]]}], ",", 
    RowBox[{"U", "\[Rule]", 
     FractionBox[
      RowBox[{"cv", " ", "p", " ", "V"}], "R"]}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.44585944694794*^9, 3.445860084740733*^9, {3.4458602040680943`*^9, 
   3.4458602255992064`*^9}, 3.4458613136859927`*^9, 3.44586157968429*^9, 
   3.535372463571471*^9, 3.53537645865625*^9, 3.535396339859375*^9, 
   3.53539638084375*^9, 3.5353964531875*^9, 3.53545542589041*^9, 
   3.535458123853208*^9, 3.535458228867543*^9, 3.535458913007924*^9, 
   3.53552598528125*^9, 3.53552639946875*^9, 3.535526464640625*^9, 
   3.535526585796875*^9, 3.535526704953125*^9, 3.535541107828125*^9, 
   3.5684467745729313`*^9, 3.568449494996645*^9, 3.5684505251879606`*^9, 
   3.5684505803574767`*^9, 3.5684506846309032`*^9, 3.568451031599059*^9, 
   3.5684510623430595`*^9, 3.568451203329059*^9, 3.568454858808698*^9, 
   3.5684568212599335`*^9, 3.568457452175836*^9, 3.5684588404238386`*^9, 
   3.5684589731881137`*^9, 3.5684590548472786`*^9, 3.568521330139377*^9, 
   3.5685221876984153`*^9, 3.5685223075584154`*^9, 3.5719993961119275`*^9, 
   3.5720003687395124`*^9, 3.572000498453233*^9, 3.5720005531912756`*^9, 
   3.572003899207822*^9, 3.5720050607171297`*^9, 3.5720086349124327`*^9, 
   3.572009245761512*^9, 3.572161169287213*^9, 3.5721614591731987`*^9, 
   3.572161672447524*^9, 3.572167675648822*^9, 3.5721679964308968`*^9, 
   3.5721737447226872`*^9, 3.572174176781889*^9, {3.575776913049615*^9, 
   3.5757769357493176`*^9}, {3.5757770218644934`*^9, 3.575777029170862*^9}, 
   3.5757998710888996`*^9, 3.577450622856335*^9, 3.5774506581628656`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"dp", " ", "=", " ", 
  RowBox[{"Collect", "[", 
   RowBox[{
    RowBox[{"dotp", "/.", 
     RowBox[{"eqs", "[", 
      RowBox[{"[", "1", "]"}], "]"}]}], ",", 
    RowBox[{"{", 
     RowBox[{"qm", ",", "dotv"}], "}"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"dotE", " ", "R"}], 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]], "Output",
 CellChangeTimes->{
  3.445859447088564*^9, 3.445860084818857*^9, {3.445860204427467*^9, 
   3.4458602257398305`*^9}, 3.445861313826617*^9, 3.445861579731165*^9, 
   3.535372464742529*^9, 3.535376458734375*^9, 3.535396339953125*^9, 
   3.535396380984375*^9, 3.535396453265625*^9, 3.5354554259060345`*^9, 
   3.5354581238844576`*^9, 3.5354582288831677`*^9, 3.535458913023549*^9, 
   3.535525985703125*^9, 3.5355263995625*^9, 3.535526464765625*^9, 
   3.535526585953125*^9, 3.5355267050625*^9, 3.535541108546875*^9, 
   3.568446774637931*^9, 3.5684494950346527`*^9, 3.5684505252199636`*^9, 
   3.5684505803924804`*^9, 3.568450684670907*^9, 3.568451031638059*^9, 
   3.568451062372059*^9, 3.568451203356059*^9, 3.5684548588507023`*^9, 
   3.568456821305938*^9, 3.568457452218836*^9, 3.568458840469843*^9, 
   3.5684589734821434`*^9, 3.5684590548752813`*^9, 3.5685213301633797`*^9, 
   3.5685221880794153`*^9, 3.568522307585415*^9, 3.5719993961431303`*^9, 
   3.5720003687551126`*^9, 3.572000498468833*^9, 3.5720005532224755`*^9, 
   3.5720038992390223`*^9, 3.57200506074833*^9, 3.5720086349474363`*^9, 
   3.572009245788514*^9, 3.5721611693132153`*^9, 3.572161459197201*^9, 
   3.572161672466526*^9, 3.572167675672824*^9, 3.572167996457899*^9, 
   3.57217374475169*^9, 3.572174176804891*^9, {3.5757769130652266`*^9, 
   3.5757769357805414`*^9}, {3.5757770218957167`*^9, 3.575777029202086*^9}, 
   3.5757998711158996`*^9, 3.5774506228983393`*^9, 3.5774506581888685`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"dT", "=", "  ", 
  RowBox[{"Collect", "[", 
   RowBox[{
    RowBox[{"dotT", "/.", 
     RowBox[{"eqs", "[", 
      RowBox[{"[", "1", "]"}], "]"}]}], ",", 
    RowBox[{"{", 
     RowBox[{"qm", ",", "dotv"}], "}"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"dotE", " ", "R", " ", "T"}], 
  RowBox[{
   RowBox[{"cv", " ", "p", " ", "V"}], "+", 
   RowBox[{"p", " ", "R", " ", "V"}]}]]], "Output",
 CellChangeTimes->{
  3.445859447151064*^9, 3.4458600849126067`*^9, {3.4458602045368414`*^9, 
   3.4458602257710805`*^9}, 3.4458613138891163`*^9, 3.445861579871789*^9, 
   3.5353724651797237`*^9, 3.5353764588125*^9, 3.535396340078125*^9, 
   3.53539638109375*^9, 3.53539645334375*^9, 3.535455425937284*^9, 
   3.5354581239000826`*^9, 3.5354582289144173`*^9, 3.535458913039174*^9, 
   3.53552598584375*^9, 3.53552639965625*^9, 3.53552646484375*^9, 
   3.535526586046875*^9, 3.53552670515625*^9, 3.535541108625*^9, 
   3.5684467746919312`*^9, 3.5684494950606575`*^9, 3.5684505252459664`*^9, 
   3.568450580450486*^9, 3.568450684706911*^9, 3.568451031671059*^9, 
   3.5684510624090595`*^9, 3.5684512033850594`*^9, 3.568454858888706*^9, 
   3.568456821351942*^9, 3.5684574522608356`*^9, 3.568458840525849*^9, 
   3.568458973522147*^9, 3.5684590549132853`*^9, 3.5685213302023835`*^9, 
   3.5685221881124153`*^9, 3.568522307634415*^9, 3.571999396174333*^9, 
   3.572000368786313*^9, 3.5720004985000334`*^9, 3.572000553253676*^9, 
   3.5720038992546225`*^9, 3.5720050607639303`*^9, 3.5720086349834394`*^9, 
   3.572009245814517*^9, 3.5721611693412185`*^9, 3.5721614592202034`*^9, 
   3.572161672487528*^9, 3.5721676756958265`*^9, 3.5721679964819016`*^9, 
   3.572173744780693*^9, 3.5721741768288937`*^9, {3.575776913096451*^9, 
   3.575776935796153*^9}, {3.575777021911329*^9, 3.575777029217698*^9}, 
   3.5757998711478996`*^9, 3.577450622933343*^9, 3.5774506582128706`*^9}]
}, Open  ]],

Cell["For the case of constant volume", "Text"],

Cell[BoxData[
 RowBox[{
  RowBox[{"dotv", " ", "=", " ", "0"}], ";"}]], "Input"],

Cell[CellGroupData[{

Cell[BoxData["dotp"], "Input"],

Cell[BoxData["dotp"], "Output",
 CellChangeTimes->{
  3.535396594625*^9, 3.5354554259529085`*^9, 3.5354581239313326`*^9, 
   3.5354582289456663`*^9, 3.535458913054799*^9, 3.53552598596875*^9, 
   3.535526399765625*^9, 3.535526464953125*^9, 3.535526586140625*^9, 
   3.535526705796875*^9, 3.535541108734375*^9, 3.568446774758931*^9, 
   3.5684494952777014`*^9, 3.5684505252859707`*^9, 3.5684505807215133`*^9, 
   3.5684506847509155`*^9, 3.5684510317220592`*^9, 3.568451062467059*^9, 
   3.5684512034230595`*^9, 3.56845485892771*^9, 3.568456821408948*^9, 
   3.568457452317836*^9, 3.568458840596856*^9, 3.5684589735771523`*^9, 
   3.56845905495529*^9, 3.568521330242388*^9, 3.568522188174415*^9, 
   3.568522307673415*^9, 3.571999396205536*^9, 3.5720003688175135`*^9, 
   3.5720004985468335`*^9, 3.572000553300476*^9, 3.572003899285823*^9, 
   3.5720050607951307`*^9, 3.572008635022444*^9, 3.57200924585052*^9, 
   3.572161169377222*^9, 3.5721614592522063`*^9, 3.5721616725145307`*^9, 
   3.5721676757308297`*^9, 3.5721679965169053`*^9, 3.572173744818697*^9, 
   3.572174176864897*^9, {3.5757769131120625`*^9, 3.5757769358273773`*^9}, {
   3.5757770219425526`*^9, 3.575777029248922*^9}, 3.5757998711948996`*^9, 
   3.5774506229843483`*^9, 3.577450658248874*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqs", " ", "=", " ", 
  RowBox[{"Solve", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"eqdotp", ",", "eqdotT", ",", "eqU", ",", "eqp"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{"dotp", ",", "dotT", ",", "mass", ",", "U"}], "}"}]}], 
   "]"}]}]], "Input",
 CellChangeTimes->{3.5354588756793423`*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"dotp", "\[Rule]", 
     FractionBox[
      RowBox[{"dotE", " ", "R"}], 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]}], ",", 
    RowBox[{"dotT", "\[Rule]", 
     FractionBox[
      RowBox[{"dotE", " ", "R", " ", "T"}], 
      RowBox[{"p", " ", 
       RowBox[{"(", 
        RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]}], ",", 
    RowBox[{"mass", "\[Rule]", 
     FractionBox[
      RowBox[{"p", " ", "V"}], 
      RowBox[{"R", " ", "T"}]]}], ",", 
    RowBox[{"U", "\[Rule]", 
     FractionBox[
      RowBox[{"cv", " ", "p", " ", "V"}], "R"]}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.4458594473073125`*^9, 3.445860085068856*^9, {3.4458602046930904`*^9, 
   3.4458602258648295`*^9}, 3.4458613140297403`*^9, 3.445861579981163*^9, 
   3.5353724652734084`*^9, 3.535376459296875*^9, 3.535396340203125*^9, 
   3.53539638128125*^9, 3.535396453828125*^9, 3.53539659903125*^9, 
   3.5354554259997826`*^9, 3.535458123978207*^9, 3.535458228992541*^9, 
   3.535458913086049*^9, 3.5355259861875*^9, 3.535526399921875*^9, 
   3.535526465109375*^9, 3.53552658628125*^9, 3.53552670596875*^9, 
   3.535541108890625*^9, 3.568446774800931*^9, 3.56844949532171*^9, 
   3.5684505253349752`*^9, 3.5684505807655177`*^9, 3.568450684789919*^9, 
   3.568451031936059*^9, 3.5684510625100594`*^9, 3.5684512034580593`*^9, 
   3.5684548589707146`*^9, 3.5684568214539523`*^9, 3.5684574523648357`*^9, 
   3.568458840655862*^9, 3.5684589736231575`*^9, 3.5684590550072947`*^9, 
   3.568521330288392*^9, 3.568522188210415*^9, 3.568522307753415*^9, 
   3.5719993962367387`*^9, 3.572000368848713*^9, 3.5720004985780334`*^9, 
   3.5720005533472767`*^9, 3.572003899317023*^9, 3.57200506082633*^9, 
   3.5720086350604477`*^9, 3.572009245888524*^9, 3.5721611694092255`*^9, 
   3.5721614592852097`*^9, 3.572161672540533*^9, 3.572167675760833*^9, 
   3.5721679965479083`*^9, 3.5721737448527*^9, 3.5721741768969*^9, {
   3.5757769131432867`*^9, 3.5757769358586006`*^9}, {3.5757770219737763`*^9, 
   3.5757770292801456`*^9}, 3.5757998712368994`*^9, 3.5774506230293527`*^9, 
   3.5774506582788773`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"dp", " ", "=", " ", 
  RowBox[{"Collect", "[", 
   RowBox[{
    RowBox[{"dotp", "/.", 
     RowBox[{"eqs", "[", 
      RowBox[{"[", "1", "]"}], "]"}]}], ",", 
    RowBox[{"{", 
     RowBox[{"qm", ",", "dotS"}], "}"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"dotE", " ", "R"}], 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]], "Output",
 CellChangeTimes->{
  3.445859447354187*^9, 3.4458600852719793`*^9, {3.4458602048337145`*^9, 
   3.4458602258960795`*^9}, 3.4458613140922403`*^9, 3.445861580043663*^9, 
   3.535372465335865*^9, 3.53537645934375*^9, 3.5353963403125*^9, 
   3.535396381390625*^9, 3.535396453921875*^9, 3.5354554260154066`*^9, 
   3.535458123993832*^9, 3.5354582290081654`*^9, 3.5354589131016736`*^9, 
   3.53552598628125*^9, 3.535526400015625*^9, 3.535526465203125*^9, 
   3.535526586359375*^9, 3.5355267060625*^9, 3.53554110959375*^9, 
   3.5684467748729315`*^9, 3.5684494953717203`*^9, 3.5684505253779793`*^9, 
   3.568450580827524*^9, 3.568450684838924*^9, 3.5684510319680595`*^9, 
   3.568451062542059*^9, 3.5684512034890594`*^9, 3.568454859016719*^9, 
   3.5684568215059576`*^9, 3.568457452407836*^9, 3.5684588409748936`*^9, 
   3.5684589736741624`*^9, 3.568459055047299*^9, 3.568521330338397*^9, 
   3.568522188255415*^9, 3.568522307804415*^9, 3.5719993962679415`*^9, 
   3.5720003688799133`*^9, 3.572000498609234*^9, 3.572000553550078*^9, 
   3.572003899348223*^9, 3.5720050608575306`*^9, 3.5720086350904503`*^9, 
   3.572009245918527*^9, 3.5721611694352274`*^9, 3.572161459309212*^9, 
   3.572161672558535*^9, 3.572167675784835*^9, 3.5721679965739107`*^9, 
   3.572173744880703*^9, 3.5721741769209023`*^9, {3.57577691317451*^9, 
   3.5757769358742127`*^9}, {3.575777022005*^9, 3.5757770292957573`*^9}, 
   3.5757998712759*^9, 3.5774506230653563`*^9, 3.5774506583038797`*^9}]
}, Open  ]],

Cell["\<\
The pressure is a function of the entropy flow dotS only. The massflow enters \
only inderectly since it affects T. \
\>", "Text"],

Cell["The energy-pressure capacitance is defined as", "Text"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Cep", " ", "=", " ", 
  RowBox[{"dotE", "/", "dp"}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{"(", 
    RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}], "R"]], "Output",
 CellChangeTimes->{
  3.445859447416687*^9, 3.4458600853501043`*^9, {3.4458602049118385`*^9, 
   3.445860225927329*^9}, 3.445861314139115*^9, 3.4458615800905375`*^9, 
   3.535372465398321*^9, 3.53537645940625*^9, 3.53539634040625*^9, 
   3.535396381546875*^9, 3.535396454015625*^9, 3.5354554260310316`*^9, 
   3.535458124025082*^9, 3.535458229039415*^9, 3.5354589131172986`*^9, 
   3.535525986375*^9, 3.53552640009375*^9, 3.535526465296875*^9, 
   3.5355265864375*^9, 3.53552670615625*^9, 3.5355411096875*^9, 
   3.568446774942931*^9, 3.5684494954197297`*^9, 3.5684505254189835`*^9, 
   3.5684505808655276`*^9, 3.568450684875928*^9, 3.568451031997059*^9, 
   3.568451062585059*^9, 3.5684512035170593`*^9, 3.568454859065724*^9, 
   3.5684568215519624`*^9, 3.568457452719836*^9, 3.568458841025899*^9, 
   3.568458973713166*^9, 3.5684590550803022`*^9, 3.5685213303654*^9, 
   3.568522188279415*^9, 3.5685223082704153`*^9, 3.5719993962991447`*^9, 
   3.5720003689111137`*^9, 3.572000498624834*^9, 3.572000553581278*^9, 
   3.572003899363823*^9, 3.572005060888731*^9, 3.5720086351224537`*^9, 
   3.57200924594553*^9, 3.5721611694642305`*^9, 3.5721614593342147`*^9, 
   3.572161672576537*^9, 3.5721676758078375`*^9, 3.5721679966039143`*^9, 
   3.5721737449087057`*^9, 3.5721741769489055`*^9, {3.5757769131901217`*^9, 
   3.575776935889825*^9}, {3.575777022020612*^9, 3.5757770293269815`*^9}, 
   3.5757998713118997`*^9, 3.57745062310136*^9, 3.577450658327882*^9}]
}, Open  ]],

Cell[BoxData[
 FormBox[
  RowBox[{
   RowBox[{"When", " ", "solving", " ", "the", " ", "equation"}], ",", " ", 
   RowBox[{
   "temperature", " ", "and", " ", "mass", "  ", "are", " ", "reduced", " ", 
    "to", " ", "\"\<book-keeping variables\>\"", " ", "that", " ", "can", " ",
     "be", " ", "calculated", " ", "after", " ", "the", " ", "pressure", " ", 
    "has", " ", "been", " ", 
    RowBox[{"calculated", "."}]}]}], TextForm]], "Text"],

Cell["The mass can be calculated from", "Text"],

Cell[BoxData[
 RowBox[{"mexpr0", "=."}]], "Input",
 CellChangeTimes->{{3.535526390484375*^9, 3.53552639084375*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemEquationsDA", "=", " ", 
   RowBox[{"{", 
    RowBox[{"mass", " ", "==", " ", 
     FractionBox[
      RowBox[{"qmp1", "+", "qmp2"}], "s"]}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535430156909875*^9, 3.535430207704972*^9}, {
   3.5354328163620415`*^9, 3.535432889533148*^9}, 3.535525965859375*^9, {
   3.5355264545*^9, 3.535526457390625*^9}, {3.568455142797043*^9, 
   3.5684551435060425`*^9}, {3.568455182633043*^9, 3.5684552084050426`*^9}, {
   3.5720183319802775`*^9, 3.572018335221463*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemVariables", "=", 
   RowBox[{"{", "mass", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535432839934885*^9, 3.535432882940875*^9}, {
  3.568455146335043*^9, 3.568455147005043*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"T", " ", "=", " ", "Tav"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"p", " ", "=", " ", "pav"}], ";"}]}], "Input"],

Cell["The temperature can be calculated as", "Text"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Texpr", " ", "=", " ", 
  RowBox[{"T", "/.", 
   RowBox[{
    RowBox[{"Solve", "[", 
     RowBox[{"eqp", ",", "T"}], "]"}], "[", 
    RowBox[{"[", "1", "]"}], "]"}]}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"pav", " ", "V"}], 
  RowBox[{"mass", " ", "R"}]]], "Output",
 CellChangeTimes->{
  3.44585944768231*^9, 3.4458600856157274`*^9, {3.4458602057555833`*^9, 
   3.445860226224202*^9}, 3.4458613143578634`*^9, 3.445861580278036*^9, 
   3.5353724672407846`*^9, 3.535376459703125*^9, 3.53539634075*^9, 
   3.5353963819375*^9, 3.53539645428125*^9, 3.5354554261091547`*^9, 
   3.5354581240875816`*^9, 3.5354582291019135`*^9, 3.535458913179798*^9, 
   3.535525987*^9, 3.535526400390625*^9, 3.535526465578125*^9, 
   3.535526586640625*^9, 3.535526706953125*^9, 3.535541109921875*^9, 
   3.5684467751039314`*^9, 3.568449495529752*^9, 3.5684505255119925`*^9, 
   3.568450580974539*^9, 3.568450685158956*^9, 3.568451032119059*^9, 
   3.568451062884059*^9, 3.5684512037940593`*^9, 3.5684548593807554`*^9, 
   3.5684568216519723`*^9, 3.568457452821836*^9, 3.568458841121908*^9, 
   3.5684589738021755`*^9, 3.5684590551883125`*^9, 3.568521330436407*^9, 
   3.568522188391415*^9, 3.568522308442415*^9, 3.5719993963771515`*^9, 
   3.5720003689891143`*^9, 3.572000498702834*^9, 3.5720005536748786`*^9, 
   3.5720038994262238`*^9, 3.572005060951131*^9, 3.5720086352004614`*^9, 
   3.572009246029538*^9, 3.5721611695402384`*^9, 3.572161459398221*^9, 
   3.5721616726245413`*^9, 3.5721676758688436`*^9, 3.5721679966659203`*^9, 
   3.5721737449757123`*^9, 3.5721741770119114`*^9, {3.5757769132369576`*^9, 
   3.5757769359522724`*^9}, {3.5757770220830593`*^9, 3.575777029373817*^9}, 
   3.5757998715589*^9, 3.5774506231983695`*^9, 3.577450658661916*^9}]
}, Open  ]],

Cell["This is to be preffered from a numerical point of view", "Text"],

Cell[BoxData[
 FormBox[
  RowBox[{"fak", "=", 
   FractionBox["1", 
    RowBox[{"1", "-", "alfa"}]]}], TextForm]], "Text"],

Cell[BoxData[
 FractionBox["1", 
  RowBox[{"1", "-", "alfa"}]]], "Output"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ZcEPexpr", " ", "=", " ", 
  FractionBox[
   RowBox[{"fak", " ", "h"}], "Cep"]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"fak", " ", "mTimestep", " ", "R"}], 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]], "Output",
 CellChangeTimes->{
  3.4458594477760596`*^9, 3.4458600857719765`*^9, {3.445860206036832*^9, 
   3.445860226302327*^9}, 3.4458613144828625`*^9, 3.445861580387411*^9, 
   3.535372467787278*^9, 3.5353764598125*^9, 3.535396340984375*^9, 
   3.53539638259375*^9, 3.53539645446875*^9, 3.535455426124779*^9, 
   3.535458124118831*^9, 3.5354582291175385`*^9, 3.535458913195423*^9, 
   3.535525987109375*^9, 3.53552640046875*^9, 3.53552646565625*^9, 
   3.53552658671875*^9, 3.535526707046875*^9, 3.535541110609375*^9, 
   3.5684467751369314`*^9, 3.5684494955697594`*^9, 3.568450525553997*^9, 
   3.5684505810315447`*^9, 3.568450685207961*^9, 3.5684510321560593`*^9, 
   3.5684510629190593`*^9, 3.568451203829059*^9, 3.56845485942776*^9, 
   3.5684568217049775`*^9, 3.568457452861836*^9, 3.568458841163913*^9, 
   3.5684589738381786`*^9, 3.5684590554813423`*^9, 3.5685213304824114`*^9, 
   3.5685221884194155`*^9, 3.568522308505415*^9, 3.5719993965955706`*^9, 
   3.572000369020314*^9, 3.5720004987340345`*^9, 3.5720005537060785`*^9, 
   3.5720038994418235`*^9, 3.572005060966731*^9, 3.572008635228464*^9, 
   3.572009246060541*^9, 3.572161169568241*^9, 3.5721614594222236`*^9, 
   3.5721616726435432`*^9, 3.572167675893846*^9, 3.572167996691923*^9, 
   3.5721737450037155`*^9, 3.572174177035914*^9, {3.575776913268182*^9, 
   3.575776935967884*^9}, {3.575777022098672*^9, 3.575777029389429*^9}, 
   3.5757998715898995`*^9, 3.5774506232323728`*^9, 3.577450658696919*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["h"], "Input",
 CellChangeTimes->{3.53539653621875*^9}],

Cell[BoxData["mTimestep"], "Output",
 CellChangeTimes->{
  3.535396536796875*^9, 3.5354554261404037`*^9, 3.535458124134456*^9, 
   3.535458229133163*^9, 3.535458913211048*^9, 3.535525987203125*^9, 
   3.535526400546875*^9, 3.535526465734375*^9, 3.535526586796875*^9, 
   3.535526707140625*^9, 3.5355411106875*^9, 3.5684467752009315`*^9, 
   3.5684494956207695`*^9, 3.5684505257770195`*^9, 3.568450581077549*^9, 
   3.5684506852429647`*^9, 3.5684510321820593`*^9, 3.568451062979059*^9, 
   3.5684512038570595`*^9, 3.5684548594687643`*^9, 3.568456821754983*^9, 
   3.5684574529048357`*^9, 3.5684588412149177`*^9, 3.5684589738731823`*^9, 
   3.5684590555143456`*^9, 3.5685213305114145`*^9, 3.5685221884554152`*^9, 
   3.568522308576415*^9, 3.571999396626774*^9, 3.5720003690515146`*^9, 
   3.572000498765235*^9, 3.572000553737279*^9, 3.572003899473024*^9, 
   3.5720050609979315`*^9, 3.5720086352574673`*^9, 3.5720092462725625`*^9, 
   3.5721611695942435`*^9, 3.572161459447226*^9, 3.572161672662545*^9, 
   3.5721676759178486`*^9, 3.5721679967209253`*^9, 3.572173745033718*^9, 
   3.5721741770599165`*^9, {3.5757769132837934`*^9, 3.5757769359991083`*^9}, {
   3.575777022129895*^9, 3.575777029420653*^9}, 3.5757998716188993`*^9, 
   3.5774506232663765`*^9, 3.5774506587209215`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["Cep"], "Input",
 CellChangeTimes->{{3.535396539625*^9, 3.535396540234375*^9}}],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{"(", 
    RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}], "R"]], "Output",
 CellChangeTimes->{
  3.535396540953125*^9, 3.535455426171653*^9, 3.5354581241657057`*^9, 
   3.5354582291644125`*^9, 3.535458913226673*^9, 3.535525987296875*^9, 
   3.5355264011875*^9, 3.535526466390625*^9, 3.535526586859375*^9, 
   3.53552670721875*^9, 3.53554111078125*^9, 3.5684467752509313`*^9, 
   3.5684494956467752`*^9, 3.568450525809023*^9, 3.568450581132554*^9, 
   3.568450685278968*^9, 3.5684510322250595`*^9, 3.568451063014059*^9, 
   3.5684512038850594`*^9, 3.568454859506768*^9, 3.5684568217919865`*^9, 
   3.568457452958836*^9, 3.5684588412619224`*^9, 3.568458973911186*^9, 
   3.5684590555463486`*^9, 3.5685213309094543`*^9, 3.568522188482415*^9, 
   3.5685223086054153`*^9, 3.571999396657976*^9, 3.572000369067115*^9, 
   3.572000498952436*^9, 3.5720005537684793`*^9, 3.572003899488624*^9, 
   3.5720050610135317`*^9, 3.57200863528647*^9, 3.572009246317567*^9, 
   3.572161169619246*^9, 3.572161459472228*^9, 3.5721616726845474`*^9, 
   3.572167675942851*^9, 3.572167996745928*^9, 3.5721737450627213`*^9, 
   3.5721741770869193`*^9, {3.575776913299405*^9, 3.57577693601472*^9}, {
   3.575777022145507*^9, 3.5757770294362645`*^9}, 3.5757998716498995`*^9, 
   3.57745062329838*^9, 3.577450658747924*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell["Characteristics", "Subsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"c", " ", "=", " ", 
  RowBox[{"{", 
   RowBox[{"cp1", ",", "cp2"}], "}"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"cp1", ",", "cp2"}], "}"}]], "Output",
 CellChangeTimes->{
  3.445859447838559*^9, 3.4458600858657255`*^9, 3.445860226380451*^9, 
   3.445861314560987*^9, 3.44586158044991*^9, 3.535372467865349*^9, 
   3.535376490375*^9, 3.535396341421875*^9, 3.53539638278125*^9, 
   3.5353964549375*^9, 3.535455426187278*^9, 3.5354581241813307`*^9, 
   3.5354582291800375`*^9, 3.535458913242298*^9, 3.535525987390625*^9, 
   3.53552640128125*^9, 3.53552646653125*^9, 3.53552658746875*^9, 
   3.53552670784375*^9, 3.535541110859375*^9, 3.5684467755169315`*^9, 
   3.5684494957057867`*^9, 3.568450525841026*^9, 3.568450581166558*^9, 
   3.568450685312971*^9, 3.568451032275059*^9, 3.5684510630670595`*^9, 
   3.5684512039180593`*^9, 3.568454859537771*^9, 3.568456821866994*^9, 
   3.568457453006836*^9, 3.568458841304927*^9, 3.56845897394919*^9, 
   3.5684590555733514`*^9, 3.5685213309424577`*^9, 3.5685221885074153`*^9, 
   3.568522308675415*^9, 3.5719993966735783`*^9, 3.572000369269916*^9, 
   3.572000498999236*^9, 3.5720005537996798`*^9, 3.572003899519824*^9, 
   3.572005061044732*^9, 3.5720086354434857`*^9, 3.57200924635157*^9, 
   3.5721611696472487`*^9, 3.5721614594952307`*^9, 3.5721616727035494`*^9, 
   3.572167675966853*^9, 3.5721679967739305`*^9, 3.572173745091724*^9, 
   3.572174177113922*^9, {3.5757769133306293`*^9, 3.5757769360303316`*^9}, {
   3.575777022176731*^9, 3.5757770294674883`*^9}, 3.5757998716828995`*^9, 
   3.577450623336383*^9, 3.577450658774927*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"q", " ", "=", " ", 
  RowBox[{"{", 
   RowBox[{"qmp1", ",", "qmp2", ",", "dEp1", ",", "dEp2"}], "}"}]}]], "Input",
 CellChangeTimes->{{3.5684503894803915`*^9, 3.5684503937628193`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"qmp1", ",", "qmp2", ",", "dEp1", ",", "dEp2"}], "}"}]], "Output",
 CellChangeTimes->{
  3.4458594479166837`*^9, 3.4458600859438505`*^9, 3.4458602264742007`*^9, 
   3.4458613146391115`*^9, 3.44586158051241*^9, 3.5353724679434195`*^9, 
   3.5353765025*^9, 3.535396341515625*^9, 3.535396382875*^9, 
   3.5353964550625*^9, 3.535455426202902*^9, 3.5354581241969557`*^9, 
   3.5354582291956615`*^9, 3.535458913257923*^9, 3.5355259878125*^9, 
   3.535526401375*^9, 3.53552646665625*^9, 3.535526587546875*^9, 
   3.53552670796875*^9, 3.535541110953125*^9, 3.568446775553931*^9, 
   3.568449495755797*^9, 3.56845052588203*^9, 3.5684505812165627`*^9, 
   3.5684506853519754`*^9, 3.5684510323070593`*^9, 3.568451063118059*^9, 
   3.568451203946059*^9, 3.568454859575775*^9, 3.5684568219209995`*^9, 
   3.5684574530558357`*^9, 3.568458841350931*^9, 3.568458973984193*^9, 
   3.568459055609355*^9, 3.568521330984462*^9, 3.568522188575415*^9, 
   3.5685223087054152`*^9, 3.5719993967047806`*^9, 3.572000369301116*^9, 
   3.5720004990148363`*^9, 3.5720005538308797`*^9, 3.5720038995510244`*^9, 
   3.572005061075932*^9, 3.5720086354934907`*^9, 3.5720092463825736`*^9, 
   3.5721611697572603`*^9, 3.572161459519233*^9, 3.5721616727225513`*^9, 
   3.572167675991856*^9, 3.5721679967989335`*^9, 3.572173745119727*^9, 
   3.572174177142925*^9, {3.575776913346241*^9, 3.575776936061556*^9}, {
   3.5757770221923428`*^9, 3.5757770294831004`*^9}, 3.5757998717088995`*^9, 
   3.5774506233733873`*^9, 3.577450658799929*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"dE", " ", "=", " ", 
  RowBox[{"{", 
   RowBox[{"dEp1", ",", "dEp2"}], "}"}]}]], "Input",
 CellChangeTimes->{{3.5684503952289658`*^9, 3.5684503959470377`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"dEp1", ",", "dEp2"}], "}"}]], "Output",
 CellChangeTimes->{
  3.445859447979183*^9, 3.4458600860219746`*^9, 3.4458602265367002`*^9, 
   3.4458613146859865`*^9, 3.4458615805749097`*^9, 3.5353724680058756`*^9, 
   3.53537650521875*^9, 3.535396341625*^9, 3.535396382984375*^9, 
   3.53539645515625*^9, 3.535455426218527*^9, 3.5354581242282057`*^9, 
   3.5354582292269115`*^9, 3.535458913289172*^9, 3.53552598790625*^9, 
   3.535526401453125*^9, 3.535526466828125*^9, 3.535526587625*^9, 
   3.5355267080625*^9, 3.53554111165625*^9, 3.568446775606931*^9, 
   3.5684494957978053`*^9, 3.568450525914033*^9, 3.568450581263568*^9, 
   3.5684506853829784`*^9, 3.5684510323590593`*^9, 3.5684510631680593`*^9, 
   3.5684512039770594`*^9, 3.5684548596217794`*^9, 3.5684568222630334`*^9, 
   3.568457453093836*^9, 3.568458841395936*^9, 3.568458974035198*^9, 
   3.5684590556423583`*^9, 3.5685213310124645`*^9, 3.5685221886034155`*^9, 
   3.568522308758415*^9, 3.571999396735984*^9, 3.572000369316716*^9, 
   3.5720004990460367`*^9, 3.5720005538620796`*^9, 3.5720038995666246`*^9, 
   3.572005061091532*^9, 3.572008635523494*^9, 3.5720092464145765`*^9, 
   3.5721611697862625`*^9, 3.572161459543236*^9, 3.5721616727425537`*^9, 
   3.572167676018859*^9, 3.572167996824936*^9, 3.57217374525074*^9, 
   3.5721741771669273`*^9, {3.575776913377465*^9, 3.5757769360771675`*^9}, {
   3.575777022223567*^9, 3.5757770294987125`*^9}, 3.5757998717388997`*^9, 
   3.57745062340839*^9, 3.577450658824932*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{"ZcEP", "=."}]], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"zc", "=", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"ZcEP", ",", "0"}], "}"}], ",", "\n", "\t\t", 
    RowBox[{"{", 
     RowBox[{"0", ",", "ZcEP"}], "}"}]}], "}"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"ZcEP", ",", "0"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"0", ",", "ZcEP"}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.4458594481354322`*^9, 3.4458600862094736`*^9, 3.4458602267398243`*^9, 
   3.445861314842235*^9, 3.445861580637409*^9, 3.5353724680995607`*^9, 
   3.535376517328125*^9, 3.535396341734375*^9, 3.5353963831875*^9, 
   3.535396455265625*^9, 3.535455426249776*^9, 3.5354581242594557`*^9, 
   3.535458229242536*^9, 3.535458913304797*^9, 3.53552598803125*^9, 
   3.5355264015625*^9, 3.535526467609375*^9, 3.535526587734375*^9, 
   3.535526708171875*^9, 3.53554111178125*^9, 3.568446775753931*^9, 
   3.568449495863818*^9, 3.5684505259720387`*^9, 3.568450581318573*^9, 
   3.568450685445985*^9, 3.5684510324180593`*^9, 3.5684510632270594`*^9, 
   3.5684512040150595`*^9, 3.5684548596927867`*^9, 3.5684568223140383`*^9, 
   3.568457453149836*^9, 3.568458841450941*^9, 3.5684589740792027`*^9, 
   3.568459055693363*^9, 3.568521331108474*^9, 3.568522188681415*^9, 
   3.5685223088224154`*^9, 3.5719993967827873`*^9, 3.572000369363517*^9, 
   3.572000499077237*^9, 3.57200055390888*^9, 3.572003899597825*^9, 
   3.572005061122732*^9, 3.572008635564498*^9, 3.5720092464525805`*^9, 
   3.572161169821266*^9, 3.572161459577239*^9, 3.572161672769556*^9, 
   3.572167676052862*^9, 3.5721679969669504`*^9, 3.5721737452927437`*^9, 
   3.5721741772049313`*^9, {3.575776913393077*^9, 3.5757769361083913`*^9}, {
   3.5757770222547903`*^9, 3.575777029529936*^9}, 3.5757998717788997`*^9, 
   3.577450623983448*^9, 3.5774506588589354`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"cd", "=", 
  RowBox[{"{", 
   RowBox[{"cdp1expr", ",", "cdp2expr"}], "}"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"cp2", "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{"dEp2", "+", 
       RowBox[{
        FractionBox["1", "2"], " ", "ka", " ", 
        RowBox[{"(", 
         RowBox[{"T0", "-", "Tav"}], ")"}]}]}], ")"}], " ", "ZcEP"}]}], ",", 
   RowBox[{"cp1", "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{"dEp1", "+", 
       RowBox[{
        FractionBox["1", "2"], " ", "ka", " ", 
        RowBox[{"(", 
         RowBox[{"T0", "-", "Tav"}], ")"}]}]}], ")"}], " ", "ZcEP"}]}]}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.445859448197932*^9, 3.4458600862875977`*^9, 3.4458602268179483`*^9, 
   3.4458613149203596`*^9, 3.4458615806999087`*^9, 3.535372468162017*^9, 
   3.535376521453125*^9, 3.53539634184375*^9, 3.53539638328125*^9, 
   3.535396455359375*^9, 3.5354554262654004`*^9, 3.5354581242750807`*^9, 
   3.535458229273785*^9, 3.535458913320422*^9, 3.535525988125*^9, 
   3.535526401640625*^9, 3.53552646796875*^9, 3.5355265878125*^9, 
   3.535526708265625*^9, 3.535541111859375*^9, 3.568446775991931*^9, 
   3.5684494959058266`*^9, 3.5684505260180435`*^9, 3.568450581369578*^9, 
   3.5684506854829884`*^9, 3.5684510324510593`*^9, 3.568451063280059*^9, 
   3.568451204042059*^9, 3.56845485972679*^9, 3.568456822368044*^9, 
   3.568457453189836*^9, 3.5684588414899454`*^9, 3.568458974113206*^9, 
   3.568459055724366*^9, 3.5685213311364765`*^9, 3.568522188736415*^9, 
   3.568522309189415*^9, 3.5719993968139906`*^9, 3.5720003693947167`*^9, 
   3.5720004991084375`*^9, 3.5720005539400806`*^9, 3.5720038996290245`*^9, 
   3.5720050611539326`*^9, 3.572008635595501*^9, 3.5720092464815836`*^9, 
   3.572161169847269*^9, 3.572161459601241*^9, 3.572161672788558*^9, 
   3.5721676760768642`*^9, 3.572167996996953*^9, 3.572173745324747*^9, 
   3.5721741772309337`*^9, {3.5757769134243*^9, 3.5757769361240034`*^9}, {
   3.5757770222704024`*^9, 3.57577702956116*^9}, 3.5757998718089*^9, 
   3.577450624052455*^9, 3.5774506588829374`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"dEk", " ", "=", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{
     FractionBox["ka", "2"], " ", 
     RowBox[{"(", 
      RowBox[{"T0", "-", "Tav"}], ")"}]}], ",", 
    RowBox[{
     FractionBox["ka", "2"], " ", 
     RowBox[{"(", 
      RowBox[{"T0", "-", "Tav"}], ")"}]}]}], "}"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{
    FractionBox["1", "2"], " ", "ka", " ", 
    RowBox[{"(", 
     RowBox[{"T0", "-", "Tav"}], ")"}]}], ",", 
   RowBox[{
    FractionBox["1", "2"], " ", "ka", " ", 
    RowBox[{"(", 
     RowBox[{"T0", "-", "Tav"}], ")"}]}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.4458594482448063`*^9, 3.4458600863657227`*^9, 3.4458602268960733`*^9, 
   3.445861314982859*^9, 3.4458615807467833`*^9, 3.535372468224473*^9, 
   3.535376525828125*^9, 3.5353963419375*^9, 3.53539638346875*^9, 
   3.535396455453125*^9, 3.535455426281025*^9, 3.5354581244157047`*^9, 
   3.53545822928941*^9, 3.535458913351672*^9, 3.53552598821875*^9, 
   3.53552640175*^9, 3.5355264680625*^9, 3.535526587890625*^9, 
   3.535526708390625*^9, 3.535541111953125*^9, 3.568446776067931*^9, 
   3.568449495941834*^9, 3.568450526054047*^9, 3.568450581433584*^9, 
   3.568450685524993*^9, 3.568451032494059*^9, 3.5684510633170595`*^9, 
   3.568451204073059*^9, 3.5684548597577934`*^9, 3.5684568224340506`*^9, 
   3.568457453228836*^9, 3.56845884153795*^9, 3.5684589741562104`*^9, 
   3.56845905576137*^9, 3.568521331187482*^9, 3.568522189042415*^9, 
   3.5685223092444153`*^9, 3.5719993968295918`*^9, 3.5720003694103165`*^9, 
   3.572000499139637*^9, 3.57200055397128*^9, 3.5720038996446247`*^9, 
   3.572005061185133*^9, 3.5720086356275043`*^9, 3.5720092465105867`*^9, 
   3.572161169873272*^9, 3.572161459626244*^9, 3.57216167280756*^9, 
   3.572167676202877*^9, 3.5721679970279565`*^9, 3.5721737453567505`*^9, 
   3.5721741773589463`*^9, {3.5757769134399123`*^9, 3.5757769361552267`*^9}, {
   3.575777022301626*^9, 3.5757770295767717`*^9}, 3.5757998718468995`*^9, 
   3.5774506241074605`*^9, 3.57745065890594*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"{", 
   RowBox[{"cdp2expr", ",", "cdp1expr"}], "}"}], " ", "=", " ", 
  RowBox[{"c", "+", 
   RowBox[{"2", " ", 
    RowBox[{"zc", ".", 
     RowBox[{"(", 
      RowBox[{"dE", "+", "dEk"}], ")"}]}]}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"cp1", "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{"dEp1", "+", 
       RowBox[{
        FractionBox["1", "2"], " ", "ka", " ", 
        RowBox[{"(", 
         RowBox[{"T0", "-", "Tav"}], ")"}]}]}], ")"}], " ", "ZcEP"}]}], ",", 
   RowBox[{"cp2", "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{"dEp2", "+", 
       RowBox[{
        FractionBox["1", "2"], " ", "ka", " ", 
        RowBox[{"(", 
         RowBox[{"T0", "-", "Tav"}], ")"}]}]}], ")"}], " ", "ZcEP"}]}]}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.4458594483073063`*^9, 3.4458600864438467`*^9, 3.4458602269898224`*^9, 
   3.4458613150453587`*^9, 3.4458615808874073`*^9, 3.5353724684274564`*^9, 
   3.535376529375*^9, 3.53539634203125*^9, 3.5353963835625*^9, 
   3.535396455546875*^9, 3.5354554263122745`*^9, 3.5354581244313293`*^9, 
   3.5354582293050346`*^9, 3.535458913367297*^9, 3.535525988328125*^9, 
   3.53552640184375*^9, 3.535526468140625*^9, 3.535526588*^9, 
   3.535526708484375*^9, 3.535541112046875*^9, 3.568446776272931*^9, 
   3.5684494959898434`*^9, 3.568450526091051*^9, 3.5684505814645877`*^9, 
   3.568450685590999*^9, 3.568451032542059*^9, 3.5684510633860593`*^9, 
   3.568451204105059*^9, 3.568454859794797*^9, 3.568456822500057*^9, 
   3.5684574532908363`*^9, 3.568458841591955*^9, 3.568458974202215*^9, 
   3.5684590557963734`*^9, 3.5685213312414875`*^9, 3.568522189114415*^9, 
   3.568522309278415*^9, 3.571999396860795*^9, 3.572000369441517*^9, 
   3.5720004991708374`*^9, 3.5720005540024805`*^9, 3.572003899675825*^9, 
   3.5720050612007327`*^9, 3.572008635657507*^9, 3.5720092465385895`*^9, 
   3.572161169898274*^9, 3.5721614597422557`*^9, 3.572161672826562*^9, 
   3.5721676762298794`*^9, 3.572167997055959*^9, 3.5721737453877535`*^9, 
   3.5721741773909492`*^9, {3.575776913471136*^9, 3.575776936170839*^9}, {
   3.57577702233285*^9, 3.5757770296079955`*^9}, 3.5757998718728995`*^9, 
   3.5774506241534653`*^9, 3.577450658929942*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell["Filtering of characteristics", "Subsubsection"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"cp1expr", "=", 
   RowBox[{
    RowBox[{"alpha", " ", "double"}], " ", "+", 
    RowBox[{
     RowBox[{"(", 
      RowBox[{"1", "-", "alpha"}], ")"}], " ", "cpl1r"}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"cp2expr", "=", 
   RowBox[{
    RowBox[{"alpha", " ", "cp2rf"}], " ", "+", 
    RowBox[{
     RowBox[{"(", 
      RowBox[{"1", "-", "alpha"}], ")"}], " ", "cpl2r"}]}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.516294111390625*^9, 3.5162941551875*^9}, 
   3.5353765348125*^9, 3.53539053815625*^9}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"cp1expr", " ", "=", " ", 
   RowBox[{"cdp1", "+", 
    RowBox[{"ZcEP", 
     FractionBox["ka", "2"], " ", 
     RowBox[{"(", 
      RowBox[{"T0", "-", "Tav"}], ")"}]}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"cp2expr", " ", "=", " ", 
   RowBox[{"cdp2", "+", 
    RowBox[{"ZcEP", 
     FractionBox[
      RowBox[{"ka", " "}], "2"], 
     RowBox[{"(", 
      RowBox[{"T0", "-", "Tav"}], ")"}]}]}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.5353703993044605`*^9, 3.5353704089374967`*^9}}]
}, Open  ]]
}, Open  ]],

Cell[BoxData[
 RowBox[{"fak", "=."}]], "Input",
 CellChangeTimes->{{3.5354585055339465`*^9, 3.5354585107681875`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"initialExpressions", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"fak", "==", 
      RowBox[{"1", "/", 
       RowBox[{"(", 
        RowBox[{"1", "-", "alpha"}], ")"}]}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"Tav", "==", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"Tp1", "+", "Tp2"}], ")"}], "/", "2"}]}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"pav", "==", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"pp1", "+", "pp2"}], ")"}], "/", "2"}]}], " ", ",", 
     "\[IndentingNewLine]", 
     RowBox[{"mass", "==", 
      FractionBox[
       RowBox[{"pav", " ", "V"}], 
       RowBox[{"Tav", " ", "R"}]]}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.535525933015625*^9, 3.535525934390625*^9}, {
  3.572018358400789*^9, 3.572018368048341*^9}, {3.5721679651057644`*^9, 
  3.5721679812263765`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"initialValues", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"Tav", "==", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"Tp1", "+", "Tp2"}], ")"}], "/", "2"}]}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"pav", "==", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"pp1", "+", "pp2"}], ")"}], "/", "2"}]}], " ", ",", 
     "\[IndentingNewLine]", 
     RowBox[{"mass", "==", 
      FractionBox[
       RowBox[{"pav", " ", "V"}], 
       RowBox[{"Tav", " ", "R"}]]}], ",", "\[IndentingNewLine]", 
     RowBox[{"ZcEP1", "==", "ZcEPexpr"}], ",", "\[IndentingNewLine]", 
     RowBox[{"ZcEP2", "==", "ZcEPexpr"}], ",", "\[IndentingNewLine]", 
     RowBox[{"cp1", "==", " ", "pp1"}], ",", "\[IndentingNewLine]", 
     RowBox[{"cp2", "==", "pp2"}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.53539636325*^9, 3.535396368984375*^9}, {
  3.5354583473183937`*^9, 3.535458378895912*^9}, {3.5684506573191724`*^9, 
  3.5684506618966303`*^9}, {3.5720183767608385`*^9, 3.572018410382762*^9}, {
  3.5721675541256704`*^9, 3.572167557997058*^9}, {3.5721676201532726`*^9, 
  3.572167644859743*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"h", "=", "mTimestep"}], ";"}]], "Input",
 CellChangeTimes->{{3.5684549457303896`*^9, 3.5684549483496513`*^9}}],

Cell[BoxData[""], "Input",
 CellChangeTimes->{{3.5684512798380594`*^9, 3.568451286134059*^9}, 
   3.5684513539022284`*^9}],

Cell[BoxData[
 RowBox[{" ", 
  RowBox[{
   RowBox[{"localExpressions", " ", "=", 
    RowBox[{"{", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"pav", "==", 
       RowBox[{
        RowBox[{
         RowBox[{"onPositive", " ", "[", 
          RowBox[{"pp1", "+", "pp2", "-", "pmin"}], "]"}], 
         FractionBox[
          RowBox[{"(", 
           RowBox[{"pp1", "+", "pp2", "-", "pmin"}], ")"}], "2"]}], " ", "+", 
        FractionBox["pmin", "2"]}]}], ",", "\[IndentingNewLine]", 
      RowBox[{"Tav", "==", "Texpr"}], ",", "\[IndentingNewLine]", 
      RowBox[{"ZcEP", "==", "ZcEPexpr"}], ",", "\[IndentingNewLine]", 
      RowBox[{"cdp1", "==", "cdp1expr"}], ",", "\[IndentingNewLine]", 
      RowBox[{"cdp2", "==", "cdp2expr"}]}], "\[IndentingNewLine]", "}"}]}], 
   ";"}]}]], "Input",
 CellChangeTimes->{{3.535389245*^9, 3.535389310125*^9}, {3.535458381317741*^9,
    3.5354583919581614`*^9}, {3.568450649202361*^9, 3.5684506543918796`*^9}, 
   3.568451420013839*^9, {3.5720184181732073`*^9, 3.5720184486629515`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"expressions", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"Tp1", "==", "Tav"}], ",", "\[IndentingNewLine]", 
     RowBox[{"Tp2", "==", "Tav"}], ",", "\[IndentingNewLine]", 
     RowBox[{"cp1", "==", "cp1expr"}], ",", "\[IndentingNewLine]", 
     RowBox[{"cp2", "==", "cp2expr"}], ",", "\[IndentingNewLine]", 
     RowBox[{"Zcp1", "==", "ZcEP"}], ",", "\[IndentingNewLine]", 
     RowBox[{"Zcp2", "==", "ZcEP"}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.535396355265625*^9, 3.5353963564375*^9}, {
   3.535458354990122*^9, 3.5354583554901123`*^9}, {3.5354583952080994`*^9, 
   3.535458407817232*^9}, 3.5354584912374372`*^9, {3.568450434646907*^9, 
   3.56845044037348*^9}, {3.5720184529101944`*^9, 3.5720184746224365`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partd"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part specification \[NoBreak]\\!\\(delayedPart \
\[LeftDoubleBracket] \\(\\(1, 1\\)\\) \[RightDoubleBracket]\\)\[NoBreak] is \
longer than depth of object. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partd\\\", ButtonNote -> \
\\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.5757769136584787`*^9, 3.575776936280122*^9}, {
   3.5757770225358047`*^9, 3.5757770298109503`*^9}, 3.5757998720329*^9, 
   3.5774506243754873`*^9, 3.577450659060955*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\\"typename\\\" \[Rule] \\\"PneumaticVolume2\\\"\\)\\), \
\\(\\(\\\"displayname\\\" \[Rule] \\\"PneumaticVolume2\\\"\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"PneumaticVolume2.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"PneumaticVolume2.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \\(\\({\\(\
\[LeftSkeleton] 1 \[RightSkeleton]\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\
\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"hopsanobjectappearance\\\", \
\\(\\({\\\"version\\\" \[Rule] \\\"0.1\\\"}\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"modelobject\\\", \\(\\({\\(\\(\\\"typename\\\" \
\[Rule] \\\"PneumaticVolume2\\\"\\)\\), \\(\\(\\\"displayname\\\" \[Rule] \
\\\"PneumaticVolume2\\\"\\)\\)}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\
\\\", \\(\\({\\(\\(\\\"isopath\\\" \[Rule] \
\\\"PneumaticVolume2.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \[Rule] \\\"ON\
\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"PneumaticVolume2.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \\(\\({\\(\
\[LeftSkeleton] 1 \[RightSkeleton]\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)\
\\)\\)]\\)\[NoBreak] is not a list of contents. The third item in an \
XMLElement must be a list of contents, even if it is an empty list. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.5757769136584787`*^9, 3.575776936280122*^9}, {
   3.5757770225358047`*^9, 3.5757770298109503`*^9}, 3.5757998720329*^9, 
   3.5774506243754873`*^9, 3.577450659079957*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.5757769136584787`*^9, 3.575776936280122*^9}, {
   3.5757770225358047`*^9, 3.5757770298109503`*^9}, 3.5757998720329*^9, 
   3.5774506243754873`*^9, 3.577450659081958*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.3333333333333333`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"y\\\" \[Rule] 0.3333333333333333`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.5757769136584787`*^9, 3.575776936280122*^9}, {
   3.5757770225358047`*^9, 3.5757770298109503`*^9}, 3.5757998720329*^9, 
   3.5774506243754873`*^9, 3.5774506590839577`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.5757769136584787`*^9, 3.575776936280122*^9}, {
   3.5757770225358047`*^9, 3.5757770298109503`*^9}, 3.5757998720329*^9, 
   3.5774506243754873`*^9, 3.577450659084958*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.6666666666666666`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"y\\\" \[Rule] 0.6666666666666666`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.5757769136584787`*^9, 3.575776936280122*^9}, {
   3.5757770225358047`*^9, 3.5757770298109503`*^9}, 3.5757998720329*^9, 
   3.5774506243754873`*^9, 3.577450659086958*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.5757769136584787`*^9, 3.575776936280122*^9}, {
   3.5757770225358047`*^9, 3.5757770298109503`*^9}, 3.5757998720329*^9, 
   3.5774506243754873`*^9, 3.5774506590879583`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.5757769136584787`*^9, 3.575776936280122*^9}, {
   3.5757770225358047`*^9, 3.5757770298109503`*^9}, 3.5757998720329*^9, 
   3.5774506243754873`*^9, 3.5774506590889583`*^9}],

Cell[BoxData["\<\"PneumaticVolume2.xml\"\>"], "Output",
 CellChangeTimes->{
  3.5353964561875*^9, 3.53545542745287*^9, 3.535458124634453*^9, 
   3.535458229586279*^9, 3.535458913523546*^9, 3.535525989125*^9, 
   3.53552640253125*^9, 3.535526469359375*^9, 3.535526588671875*^9, 
   3.53552670925*^9, 3.53554111803125*^9, 3.568446777936931*^9, 
   3.5684494964409337`*^9, 3.568450526332075*^9, 3.5684505823786793`*^9, 
   3.568450685939034*^9, 3.568451032821059*^9, 3.568451063707059*^9, 
   3.5684512043520594`*^9, 3.5684548600758247`*^9, 3.568456822950102*^9, 
   3.568457453927836*^9, 3.568458842199016*^9, 3.5684589747732725`*^9, 
   3.568459056106405*^9, 3.568521331529516*^9, 3.568522189739415*^9, 
   3.568522309600415*^9, 3.571999397063613*^9, 3.5720003696599183`*^9, 
   3.572000499389239*^9, 3.5720005546016865`*^9, 3.5720038999878273`*^9, 
   3.572005061512735*^9, 3.5720086359815397`*^9, 3.572009247226658*^9, 
   3.572161170489333*^9, 3.5721614599152727`*^9, 3.5721616729735765`*^9, 
   3.5721676764319*^9, 3.5721679972839823`*^9, 3.572173745572772*^9, 
   3.572174177584969*^9, {3.575776913674091*^9, 3.575776936295734*^9}, {
   3.5757770225670285`*^9, 3.575777029826562*^9}, 3.5757998720648994`*^9, 
   3.5774506243824883`*^9, 3.577450659089958*^9}]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell["Gas generator", "Section",
 CellChangeTimes->{
  3.5353721004569864`*^9, {3.5353722238417835`*^9, 3.5353722289626513`*^9}, {
   3.572196966974698*^9, 3.5721969692378283`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Pneumatic\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<GasGenerator\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Gas generator\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentC\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFilenames", "[", 
   RowBox[{"defaultPath", ",", "domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.53537005401182*^9, 3.5353700749665146`*^9}, {
   3.5721969768362627`*^9, 3.5721969930941925`*^9}, 3.5757768079563*^9}],

Cell[BoxData[
 RowBox[{"ka", "=."}]], "Input",
 CellChangeTimes->{{3.5685222861784153`*^9, 3.568522287312415*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", "  ", "=", " ", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{
     "mass", ",", "0.001", ",", "double", ",", "\"\<kg\>\"", ",", 
      "\"\<Mass in volume\>\""}], "}"}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535370104846068*^9, 3.535370110494318*^9}, {
  3.535370314418211*^9, 3.5353703208038054`*^9}, {3.535458829959422*^9, 
  3.535458830287555*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "V", ",", "0.001", ",", "double", ",", "\"\<m3\>\"", ",", 
       "\"\<Volume\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "R", ",", "287.", ",", "double", ",", "\"\<J/Kg K\>\"", ",", 
       "\"\<Gas constant\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "cv", ",", "718.", ",", "double", ",", "\"\<J/Kg K\>\"", ",", 
       "\"\<heatcoeff\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "ka", ",", "0.", ",", "double", ",", "\"\<J/Ks\>\"", ",", 
       "\"\<heat conductance\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "T0", ",", "300.", ",", "double", ",", "\"\<K\>\"", ",", 
       "\"\<Outside temperature\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "alpha", ",", "0.1", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<numerical damping\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "pmin", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<numerical min pressure\>\""}], "}"}]}], "\n", "\t\t", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.5353703270176597`*^9, 3.535370334183889*^9}, {
  3.568449074163356*^9, 3.568449076163355*^9}, {3.568451365855424*^9, 
  3.5684513868785257`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"portConnections", "=", 
   RowBox[{"{", "\[IndentingNewLine]", "\t", 
    RowBox[{
     RowBox[{"HydraulicCport", "[", 
      RowBox[{"p1", ",", "100000.", ",", "\"\<fluid port 1\>\"", ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0.5", ",", "270"}], "}"}]}], "]"}], ",", 
     "\[IndentingNewLine]", "\t", 
     RowBox[{"PneumaticCport", "[", 
      RowBox[{"p2", ",", "100000.", ",", "\"\<fluid port 2\>\"", ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0.5", ",", "90"}], "}"}]}], "]"}]}], "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.4458567530827656`*^9, 3.445856805848053*^9}, {
  3.516293489375*^9, 3.516293499125*^9}, {3.535541977*^9, 
  3.535541991625*^9}, {3.535542208609375*^9, 3.5355422090625*^9}, {
  3.535542381671875*^9, 3.535542392828125*^9}, {3.5684503752639694`*^9, 
  3.568450377478191*^9}, {3.5721614844077215`*^9, 3.5721614913734183`*^9}, {
  3.5721970168735523`*^9, 3.572197019163684*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"nodeConnections", "=", 
   RowBox[{"{", "\[IndentingNewLine]", "\t", 
    RowBox[{
     RowBox[{"HydraulicCport", "[", 
      RowBox[{"p1", ",", "100000.", ",", "\"\<fluid port 1\>\""}], "]"}], ",",
      "\[IndentingNewLine]", "\t", 
     RowBox[{"PneumaticCnode", "[", 
      RowBox[{"p2", ",", "100000.", ",", "\"\<fluid port 2\>\""}], "]"}]}], 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.4458567530827656`*^9, 3.445856805848053*^9}, {
   3.516293489375*^9, 3.516293499125*^9}, {3.535541977*^9, 
   3.535541991625*^9}, {3.535542208609375*^9, 3.5355422090625*^9}, {
   3.535542381671875*^9, 3.535542392828125*^9}, {3.5684503752639694`*^9, 
   3.568450377478191*^9}, {3.5684509832627635`*^9, 3.5684509970240593`*^9}, {
   3.5684511449390593`*^9, 3.568451145238059*^9}, {3.5721614930495863`*^9, 
   3.572161494468728*^9}, 3.57219702784418*^9}],

Cell[CellGroupData[{

Cell["Pressure and temperature", "Subsection"],

Cell[CellGroupData[{

Cell["Definition of rules", "Subsubsection"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Unprotect", "[", "D", "]"}], ";"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"x_", "  ", "y_"}], ",", "t_"}], "]"}], ":=", 
   RowBox[{
    RowBox[{
     RowBox[{"D", "[", 
      RowBox[{"x", ",", "t"}], "]"}], "y"}], "+", 
    RowBox[{"x", " ", 
     RowBox[{"D", "[", " ", 
      RowBox[{"y", ",", "t"}], "]"}]}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"x_", " ", "/", "y_"}], ",", "t_"}], "]"}], ":=", 
   RowBox[{
    RowBox[{
     RowBox[{"D", "[", 
      RowBox[{"x", ",", "t"}], "]"}], "/", "y"}], "-", 
    RowBox[{"x", " ", 
     RowBox[{
      RowBox[{"D", "[", " ", 
       RowBox[{"y", ",", "t"}], "]"}], "/", 
      RowBox[{"y", "^", "2"}]}]}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"x_", "+", "y_"}], ",", "t_"}], "]"}], ":=", 
   RowBox[{
    RowBox[{"D", "[", 
     RowBox[{"x", ",", "t"}], "]"}], "+", 
    RowBox[{"D", "[", 
     RowBox[{"y", ",", "t"}], "]"}]}]}], ";"}]}], "Input"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"p", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"dotv", " ", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"U", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"H", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"dotU", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"T", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"dotv", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Tav", "=."}], ";"}]}], "Input"],

Cell[BoxData[
 RowBox[{" ", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "m"}], "=", " ", "qm"}], "  ", 
    ";"}], "\n", 
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "p"}], " ", "=", " ", "dotp"}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "v"}], " ", "=", " ", "dotv"}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "T"}], " ", "=", " ", "dotT"}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "U"}], "=", " ", "dotU"}], ";"}],
    "\n", 
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "H"}], "=", " ", "dotH"}], 
    ";"}]}]}]], "Input"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Equations", "Subsection"],

Cell[BoxData[
 RowBox[{
  RowBox[{"eqp", " ", "=", " ", 
   RowBox[{"p", " ", "==", " ", 
    FractionBox[
     RowBox[{"mass", " ", "R", " ", "T"}], "V"]}]}], ";"}]], "Input",
 CellChangeTimes->{3.535458850131813*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"eqU", " ", "=", " ", 
   RowBox[{"U", " ", "==", " ", 
    RowBox[{"mass", " ", "cv", " ", "T"}]}]}], ";"}]], "Input",
 CellChangeTimes->{3.535458851741229*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"eqH", " ", "=", " ", 
   RowBox[{"H", " ", "==", " ", 
    RowBox[{"U", " ", "+", "  ", 
     RowBox[{"p", " ", "V"}]}]}]}], ";"}]], "Input"],

Cell[BoxData[
 FormBox[
  RowBox[{"H", "=", 
   RowBox[{"m", " ", "T", 
    RowBox[{"(", 
     RowBox[{
      SubscriptBox["c", "v"], " ", "+", " ", "R"}], ")"}]}]}], 
  TextForm]], "DisplayFormula"],

Cell[CellGroupData[{

Cell[BoxData["T"], "Input",
 CellChangeTimes->{3.535376178078125*^9}],

Cell[BoxData["T"], "Output",
 CellChangeTimes->{
  3.53537617896875*^9, 3.53537643790625*^9, 3.535396337234375*^9, 
   3.5353963794375*^9, 3.5353964519375*^9, 3.535455425624792*^9, 
   3.5354581235875845`*^9, 3.535458228601923*^9, 3.535458912726676*^9, 
   3.53552598378125*^9, 3.5355263970625*^9, 3.53552646228125*^9, 
   3.535526583453125*^9, 3.535526702921875*^9, 3.5355411041875*^9, 
   3.568446773642931*^9, 3.568449494431532*^9, 3.5684505247469163`*^9, 
   3.5684505798214235`*^9, 3.5684506840878487`*^9, 3.568451031075059*^9, 
   3.568451061855059*^9, 3.568451202913059*^9, 3.568454858262644*^9, 
   3.568456820307838*^9, 3.5684574515738363`*^9, 3.568458839806777*^9, 
   3.5684589726270576`*^9, 3.5684590543882327`*^9, 3.5685213297233353`*^9, 
   3.5685221871174154`*^9, 3.5685223070394154`*^9, 3.571999395706291*^9, 
   3.5720003683651104`*^9, 3.5720004980476303`*^9, 3.572000552629672*^9, 
   3.5720038989114203`*^9, 3.5720050603895273`*^9, 3.5720086344513865`*^9, 
   3.5720092453474703`*^9, 3.5721611688981743`*^9, 3.5721614588511667`*^9, 
   3.5721616721834974`*^9, 3.572167675321789*^9, 3.5721679960798616`*^9, 
   3.5721737443466496`*^9, 3.572174176445855*^9, {3.575776913814598*^9, 
   3.5757769365455246`*^9}, {3.575777022785595*^9, 3.5757770299826813`*^9}, 
   3.5757998722738996`*^9, 3.577450624944544*^9, 3.577450659251974*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqT", " ", "=", " ", 
  RowBox[{"T", "==", " ", 
   FractionBox[
    RowBox[{"U", " ", "+", "  ", 
     RowBox[{"p", " ", "V"}]}], 
    RowBox[{"mass", 
     RowBox[{"(", 
      RowBox[{"cv", " ", "+", " ", "R"}], ")"}]}]]}]}]], "Input",
 CellChangeTimes->{3.535458858491402*^9}],

Cell[BoxData[
 RowBox[{"T", "\[Equal]", 
  FractionBox[
   RowBox[{"U", "+", 
    RowBox[{"p", " ", "V"}]}], 
   RowBox[{"mass", " ", 
    RowBox[{"(", 
     RowBox[{"cv", "+", "R"}], ")"}]}]]}]], "Output",
 CellChangeTimes->{
  3.4458594457448225`*^9, 3.44586008367824*^9, {3.445860217271135*^9, 
   3.4458602246460876`*^9}, 3.4458613129516225`*^9, 3.445861579059294*^9, 
   3.535372461760236*^9, 3.535376183203125*^9, 3.535376438015625*^9, 
   3.53539633784375*^9, 3.5353963795*^9, 3.535396452*^9, 3.535455425656041*^9,
    3.5354581236032095`*^9, 3.535458228617548*^9, 3.535458912742301*^9, 
   3.535525983859375*^9, 3.535526397171875*^9, 3.535526462375*^9, 
   3.535526583546875*^9, 3.535526703046875*^9, 3.53554110428125*^9, 
   3.568446773725931*^9, 3.568449494484543*^9, 3.5684505247799196`*^9, 
   3.568450579858427*^9, 3.5684506841258526`*^9, 3.5684510311090593`*^9, 
   3.5684510618970594`*^9, 3.568451202948059*^9, 3.568454858308648*^9, 
   3.568456820440851*^9, 3.568457451616836*^9, 3.568458839847781*^9, 
   3.568458972663061*^9, 3.5684590544242363`*^9, 3.5685213297473383`*^9, 
   3.5685221871454153`*^9, 3.568522307083415*^9, 3.571999395737494*^9, 
   3.5720003683963103`*^9, 3.5720004980788307`*^9, 3.572000552660872*^9, 
   3.57200389892702*^9, 3.5720050604207277`*^9, 3.5720086344823895`*^9, 
   3.5720092453834734`*^9, 3.5721611689241767`*^9, 3.5721614588761687`*^9, 
   3.5721616722145004`*^9, 3.5721676753487916`*^9, 3.572167996105864*^9, 
   3.5721737443746524`*^9, 3.5721741764688573`*^9, {3.575776913845822*^9, 
   3.575776936576748*^9}, {3.575777022816819*^9, 3.575777029998293*^9}, 
   3.5757998723039*^9, 3.5774506249775476`*^9, 3.577450659275977*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqdotp", " ", "=", 
  RowBox[{
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"eqp", "[", 
      RowBox[{"[", "1", "]"}], "]"}], ",", "t"}], "]"}], "==", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"eqp", "[", 
      RowBox[{"[", "2", "]"}], "]"}], ",", "t"}], "]"}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{"dotp", "\[Equal]", 
  FractionBox[
   RowBox[{"dotT", " ", "mass", " ", "R"}], "V"]}]], "Output",
 CellChangeTimes->{
  3.445859445807322*^9, 3.445860083756364*^9, {3.4458602173492594`*^9, 
   3.4458602247398367`*^9}, 3.445861313014122*^9, 3.4458615791061687`*^9, 
   3.535372462181816*^9, 3.535376191640625*^9, 3.535376438109375*^9, 
   3.53539633828125*^9, 3.535396379546875*^9, 3.535396452078125*^9, 
   3.5354554256716657`*^9, 3.5354581236188345`*^9, 3.5354582286331725`*^9, 
   3.535458912773551*^9, 3.5355259839375*^9, 3.535526397265625*^9, 
   3.53552646246875*^9, 3.535526583640625*^9, 3.53552670375*^9, 
   3.53554110440625*^9, 3.568446773755931*^9, 3.568449494533552*^9, 
   3.568450524813923*^9, 3.568450579896431*^9, 3.5684506841708574`*^9, 
   3.568451031137059*^9, 3.5684510619320593`*^9, 3.5684512029850593`*^9, 
   3.5684548583816557`*^9, 3.5684568204858556`*^9, 3.568457451662836*^9, 
   3.5684588398917856`*^9, 3.568458972703065*^9, 3.5684590544562397`*^9, 
   3.568521329799343*^9, 3.5685221871784153`*^9, 3.5685223071104155`*^9, 
   3.571999395768697*^9, 3.57200036841191*^9, 3.572000498110031*^9, 
   3.5720005526920724`*^9, 3.5720038989582205`*^9, 3.572005060436328*^9, 
   3.5720086345203934`*^9, 3.572009245416477*^9, 3.57216116896218*^9, 
   3.5721614589011717`*^9, 3.5721616722355027`*^9, 3.572167675372794*^9, 
   3.5721679961318665`*^9, 3.572173744402655*^9, 3.5721741764918594`*^9, {
   3.5757769138614335`*^9, 3.57577693659236*^9}, {3.5757770228480425`*^9, 
   3.5757770300139046`*^9}, 3.5757998723358994`*^9, 3.577450625018552*^9, 
   3.577450659299979*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqdotS", " ", "=", " ", 
  RowBox[{"dotU", " ", "==", " ", 
   RowBox[{
    RowBox[{"dotSq", " ", "T"}], " ", "+", " ", 
    RowBox[{"dotSew", " ", "T"}]}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{"dotU", "\[Equal]", 
  RowBox[{
   RowBox[{"dotSew", " ", "T"}], "+", 
   RowBox[{"dotSq", " ", "T"}]}]}]], "Output",
 CellChangeTimes->{
  3.4458594458854465`*^9, 3.445860083834489*^9, {3.445860217411759*^9, 
   3.4458602248179617`*^9}, 3.4458613130609965`*^9, 3.4458615791686687`*^9, 
   3.5353724622442727`*^9, 3.535376200390625*^9, 3.53537644465625*^9, 
   3.535396338390625*^9, 3.535396379609375*^9, 3.535396452140625*^9, 
   3.53545542568729*^9, 3.5354581236500845`*^9, 3.535458228648797*^9, 
   3.5354589127891755`*^9, 3.535525984015625*^9, 3.535526397921875*^9, 
   3.535526463125*^9, 3.53552658425*^9, 3.535526703890625*^9, 
   3.535541105140625*^9, 3.568446773812931*^9, 3.568449494581562*^9, 
   3.568450524849927*^9, 3.5684505799334345`*^9, 3.568450684210861*^9, 
   3.568451031177059*^9, 3.5684510619630594`*^9, 3.568451203013059*^9, 
   3.568454858413659*^9, 3.568456820544862*^9, 3.568457451703836*^9, 
   3.5684588399487915`*^9, 3.5684589727450695`*^9, 3.568459054490243*^9, 
   3.5685213298233457`*^9, 3.568522187203415*^9, 3.568522307153415*^9, 
   3.571999395784298*^9, 3.5720003684431105`*^9, 3.5720004981412306`*^9, 
   3.5720005527232723`*^9, 3.5720038989738207`*^9, 3.5720050604675283`*^9, 
   3.572008634564398*^9, 3.57200924544848*^9, 3.5721611689871826`*^9, 
   3.572161458928174*^9, 3.5721616722535048`*^9, 3.572167675396796*^9, 
   3.5721679961578693`*^9, 3.572173744431658*^9, 3.572174176514862*^9, {
   3.5757769138926573`*^9, 3.575776936607972*^9}, {3.575777022863655*^9, 
   3.575777030045129*^9}, 3.5757998723708997`*^9, 3.5774506250505548`*^9, 
   3.5774506593239813`*^9}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"dotUq", " ", "=", "   ", 
   RowBox[{"qm", " ", "cv", " ", "Tin"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"DotUew", " ", "=", " ", 
   RowBox[{"p", " ", "qv"}]}], ";"}]}], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqdotU", " ", "=", " ", 
  RowBox[{"dotE", " ", "==", " ", 
   RowBox[{"dotUq", " ", "+", " ", "dotUew"}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{"dotE", "\[Equal]", 
  RowBox[{"dotUew", "+", 
   RowBox[{"cv", " ", "qm", " ", "Tin"}]}]}]], "Output",
 CellChangeTimes->{
  3.4458594460573206`*^9, 3.445860083928238*^9, {3.4458602175055084`*^9, 
   3.4458602249117107`*^9}, 3.445861313139121*^9, 3.445861579231168*^9, 
   3.5353724623379574`*^9, 3.535376200890625*^9, 3.535376444828125*^9, 
   3.535396338515625*^9, 3.53539637975*^9, 3.535396452234375*^9, 
   3.5354554257185397`*^9, 3.535458123681334*^9, 3.535458228680047*^9, 
   3.5354589128204255`*^9, 3.53552598446875*^9, 3.5355263980625*^9, 
   3.53552646325*^9, 3.535526584375*^9, 3.53552670403125*^9, 
   3.535541105296875*^9, 3.568446773884931*^9, 3.5684494946335726`*^9, 
   3.5684505248919306`*^9, 3.56845057998944*^9, 3.5684506842548656`*^9, 
   3.568451031231059*^9, 3.568451062028059*^9, 3.5684512030570593`*^9, 
   3.568454858484666*^9, 3.5684568206138687`*^9, 3.568457451775836*^9, 
   3.568458839998796*^9, 3.5684589728170767`*^9, 3.568459054538248*^9, 
   3.56852132986735*^9, 3.568522187267415*^9, 3.5685223071884155`*^9, 
   3.5719993958311024`*^9, 3.572000368489911*^9, 3.572000498188031*^9, 
   3.572000552848073*^9, 3.572003899005021*^9, 3.5720050604987288`*^9, 
   3.5720086346114025`*^9, 3.572009245487484*^9, 3.5721611690231867`*^9, 
   3.5721614589631777`*^9, 3.572161672279507*^9, 3.5721676754318*^9, 
   3.5721679961918726`*^9, 3.5721737444686613`*^9, 3.5721741765468655`*^9, {
   3.5757769139238815`*^9, 3.575776936639196*^9}, {3.5757770229104905`*^9, 
   3.575777030076352*^9}, 3.5757998725788994`*^9, 3.57745062509956*^9, 
   3.577450659356985*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["dotU"], "Input"],

Cell[BoxData["dotU"], "Output",
 CellChangeTimes->{
  3.445859446135445*^9, 3.445860084006363*^9, {3.4458602175836325`*^9, 
   3.4458602249898353`*^9}, 3.445861313185996*^9, 3.445861579293668*^9, 
   3.535372462400414*^9, 3.53537620096875*^9, 3.535376444921875*^9, 
   3.535396338609375*^9, 3.535396379828125*^9, 3.5353964523125*^9, 
   3.535455425734164*^9, 3.535458123696959*^9, 3.535458228695671*^9, 
   3.5354589128360505`*^9, 3.53552598453125*^9, 3.535526398140625*^9, 
   3.535526463328125*^9, 3.535526584484375*^9, 3.535526704125*^9, 
   3.53554110540625*^9, 3.5684467739319315`*^9, 3.568449494681582*^9, 
   3.5684505249249344`*^9, 3.5684505800294437`*^9, 3.5684506843048706`*^9, 
   3.568451031275059*^9, 3.5684510620690594`*^9, 3.568451203086059*^9, 
   3.5684548585196695`*^9, 3.568456820648872*^9, 3.5684574518318357`*^9, 
   3.5684588400508013`*^9, 3.568458972863081*^9, 3.5684590545742517`*^9, 
   3.5685213298913527`*^9, 3.5685221872974153`*^9, 3.568522307246415*^9, 
   3.571999395862305*^9, 3.5720003685211115`*^9, 3.5720004982192316`*^9, 
   3.572000552910474*^9, 3.5720038990362215`*^9, 3.5720050605299287`*^9, 
   3.5720086346424055`*^9, 3.5720092455174875`*^9, 3.572161169048189*^9, 
   3.5721614589871798`*^9, 3.5721616722985086`*^9, 3.5721676754548025`*^9, 
   3.572167996216875*^9, 3.5721737444976645`*^9, 3.5721741765698676`*^9, {
   3.575776913939493*^9, 3.5757769366704197`*^9}, {3.5757770229261026`*^9, 
   3.5757770301075764`*^9}, 3.5757998726059*^9, 3.5774506251325626`*^9, 
   3.5774506593819876`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{" ", 
  RowBox[{"dotU", " ", "=", 
   RowBox[{"dotE", "-", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"p", " ", "V"}], ",", "t"}], "]"}]}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{"dotE", "-", 
  RowBox[{"dotp", " ", "V"}]}]], "Output",
 CellChangeTimes->{
  3.4458594461979446`*^9, 3.4458600841782365`*^9, {3.445860217708632*^9, 
   3.44586022506796*^9}, 3.445861313248495*^9, 3.4458615793405423`*^9, 
   3.5353724624628706`*^9, 3.5353762010625*^9, 3.53537644503125*^9, 
   3.535396338703125*^9, 3.5353963799375*^9, 3.535396452375*^9, 
   3.5354554257654133`*^9, 3.535458123712584*^9, 3.535458228726921*^9, 
   3.535458912851675*^9, 3.535525984640625*^9, 3.535526398234375*^9, 
   3.535526463421875*^9, 3.535526584578125*^9, 3.53552670421875*^9, 
   3.535541106140625*^9, 3.568446773989931*^9, 3.5684494947235904`*^9, 
   3.5684505249609375`*^9, 3.5684505800594473`*^9, 3.5684506843348737`*^9, 
   3.5684510313200593`*^9, 3.5684510621030593`*^9, 3.568451203119059*^9, 
   3.5684548585556726`*^9, 3.5684568207148786`*^9, 3.568457451875836*^9, 
   3.5684588400948057`*^9, 3.5684589729070854`*^9, 3.568459054612255*^9, 
   3.5685213299343567`*^9, 3.5685221873554153`*^9, 3.5685223072974153`*^9, 
   3.571999395893508*^9, 3.5720003685523114`*^9, 3.5720004982504315`*^9, 
   3.572000552941674*^9, 3.572003899051821*^9, 3.572005060545529*^9, 
   3.5720086346704082`*^9, 3.57200924554749*^9, 3.5721611690741916`*^9, 
   3.5721614590131826`*^9, 3.572161672316511*^9, 3.572167675481805*^9, 
   3.572167996242878*^9, 3.5721737445266676`*^9, 3.57217417659387*^9, {
   3.575776913970717*^9, 3.5757769366860313`*^9}, {3.575777022957326*^9, 
   3.575777030123188*^9}, 3.5757998726389*^9, 3.5774506251675663`*^9, 
   3.5774506594049897`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"qv", " ", "=", " ", 
  RowBox[{"qm", " ", "R", " ", 
   RowBox[{"Tin", "/", "p"}]}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"qm", " ", "R", " ", "Tin"}], "p"]], "Output",
 CellChangeTimes->{
  3.445859446260444*^9, 3.445860084256361*^9, {3.4458602177867565`*^9, 
   3.4458602251304593`*^9}, 3.44586131329537*^9, 3.4458615793874173`*^9, 
   3.5353724625253267`*^9, 3.53537620115625*^9, 3.535376445125*^9, 
   3.535396338796875*^9, 3.53539638034375*^9, 3.53539645271875*^9, 
   3.5354554257810383`*^9, 3.5354581237438335`*^9, 3.5354582287425456`*^9, 
   3.535458912882925*^9, 3.53552598471875*^9, 3.535526398328125*^9, 
   3.535526463515625*^9, 3.535526584671875*^9, 3.5355267043125*^9, 
   3.535541106234375*^9, 3.568446774045931*^9, 3.5684494947685995`*^9, 
   3.568450524992941*^9, 3.56845058009245*^9, 3.5684506843808784`*^9, 
   3.5684510313470592`*^9, 3.568451062138059*^9, 3.568451203146059*^9, 
   3.568454858596677*^9, 3.568456820769884*^9, 3.568457451916836*^9, 
   3.5684588401518116`*^9, 3.568458972963091*^9, 3.5684590546422586`*^9, 
   3.5685213299613595`*^9, 3.568522187403415*^9, 3.568522307324415*^9, 
   3.5719993959247108`*^9, 3.5720003685835114`*^9, 3.5720004982816315`*^9, 
   3.5720005529728737`*^9, 3.572003899083021*^9, 3.572005060576729*^9, 
   3.5720086347104125`*^9, 3.572009245578493*^9, 3.572161169100194*^9, 
   3.572161459036185*^9, 3.5721616723345127`*^9, 3.5721676755078077`*^9, 
   3.5721679962698803`*^9, 3.5721737445556707`*^9, 3.5721741766188726`*^9, {
   3.575776913986329*^9, 3.5757769367016435`*^9}, {3.575777022972938*^9, 
   3.5757770301544123`*^9}, 3.5757998726699*^9, 3.57745062520357*^9, 
   3.5774506596960187`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqH", "[", 
  RowBox[{"[", "2", "]"}], "]"}]], "Input",
 CellChangeTimes->{{3.535376292203125*^9, 3.535376293234375*^9}}],

Cell[BoxData[
 RowBox[{"U", "+", 
  RowBox[{"p", " ", "V"}]}]], "Output",
 CellChangeTimes->{{3.535376284734375*^9, 3.535376293875*^9}, 
   3.535376451671875*^9, 3.53539633890625*^9, 3.535396380421875*^9, 
   3.5353964528125*^9, 3.5354554257966623`*^9, 3.5354581237594585`*^9, 
   3.53545822875817*^9, 3.53545891289855*^9, 3.535525984796875*^9, 
   3.53552639896875*^9, 3.53552646415625*^9, 3.535526585296875*^9, 
   3.53552670440625*^9, 3.5355411063125*^9, 3.5684467740919313`*^9, 
   3.5684494947936044`*^9, 3.5684505250199437`*^9, 3.568450580127454*^9, 
   3.5684506844348836`*^9, 3.568451031388059*^9, 3.5684510621690593`*^9, 
   3.5684512031760592`*^9, 3.568454858632681*^9, 3.568456820835891*^9, 
   3.568457451959836*^9, 3.568458840196816*^9, 3.568458973002095*^9, 
   3.568459054677262*^9, 3.5685213300023637`*^9, 3.5685221874684153`*^9, 
   3.5685223073814154`*^9, 3.5719993959559135`*^9, 3.5720003686147118`*^9, 
   3.572000498312832*^9, 3.572000553004074*^9, 3.5720038990986214`*^9, 
   3.572005060607929*^9, 3.572008634746416*^9, 3.572009245606496*^9, 
   3.5721611691251965`*^9, 3.572161459059187*^9, 3.5721616723535147`*^9, 
   3.57216767553181*^9, 3.572167996302884*^9, 3.5721737445856733`*^9, 
   3.572174176644875*^9, {3.5757769140019407`*^9, 3.5757769367328672`*^9}, {
   3.575777023004162*^9, 3.575777030170024*^9}, 3.5757998727029*^9, 
   3.5774506252355733`*^9, 3.577450659736023*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqdotT", " ", "=", " ", 
  RowBox[{"dotT", " ", "==", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"eqH", "[", 
       RowBox[{"[", "2", "]"}], "]"}], "/", 
      RowBox[{"(", 
       RowBox[{"mass", " ", 
        RowBox[{"(", 
         RowBox[{"cv", "+", "R"}], ")"}]}], ")"}]}], ",", "t"}], 
    "]"}]}]}]], "Input",
 CellChangeTimes->{3.5354588608508377`*^9}],

Cell[BoxData[
 RowBox[{"dotT", "\[Equal]", 
  FractionBox["dotE", 
   RowBox[{"mass", " ", 
    RowBox[{"(", 
     RowBox[{"cv", "+", "R"}], ")"}]}]]}]], "Output",
 CellChangeTimes->{
  3.4458594463385687`*^9, 3.44586008435011*^9, {3.4458602178648806`*^9, 
   3.445860225208584*^9}, 3.4458613133734946`*^9, 3.445861579449917*^9, 
   3.535372462619011*^9, 3.535376205578125*^9, 3.535376451765625*^9, 
   3.535396339265625*^9, 3.5353963805*^9, 3.535396452875*^9, 
   3.5354554258122873`*^9, 3.5354581237907085`*^9, 3.5354582287894197`*^9, 
   3.535458912914175*^9, 3.535525984875*^9, 3.5355263990625*^9, 
   3.53552646425*^9, 3.535526585390625*^9, 3.535526704515625*^9, 
   3.53554110640625*^9, 3.5684467741649313`*^9, 3.568449494834613*^9, 
   3.5684505250539474`*^9, 3.5684505801644573`*^9, 3.5684506845028906`*^9, 
   3.568451031436059*^9, 3.568451062204059*^9, 3.568451203205059*^9, 
   3.5684548586746845`*^9, 3.568456820867894*^9, 3.568457452016836*^9, 
   3.5684588402438207`*^9, 3.568458973038099*^9, 3.568459054711265*^9, 
   3.568521330028366*^9, 3.568522187524415*^9, 3.5685223074224153`*^9, 
   3.5719993959871163`*^9, 3.572000368630312*^9, 3.5720004983440323`*^9, 
   3.5720005530352745`*^9, 3.572003899129822*^9, 3.5720050606235294`*^9, 
   3.5720086347794194`*^9, 3.572009245633499*^9, 3.572161169150199*^9, 
   3.5721614590831895`*^9, 3.572161672373516*^9, 3.5721676755568123`*^9, 
   3.5721679963278866`*^9, 3.5721737446146765`*^9, 3.5721741766698775`*^9, {
   3.5757769140331645`*^9, 3.575776936748479*^9}, {3.5757770230353856`*^9, 
   3.5757770302012477`*^9}, 3.5757998727289*^9, 3.577450625267576*^9, 
   3.5774506597610254`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Solving the quations", "Subsection"],

Cell[BoxData[
 RowBox[{
  RowBox[{"dotV", "=."}], ";"}]], "Input"],

Cell["The system of equations", "Text"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"eqdotp", ",", "eqp", ",", "eqU"}], "}"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"dotp", "\[Equal]", 
    FractionBox[
     RowBox[{"dotT", " ", "mass", " ", "R"}], "V"]}], ",", 
   RowBox[{"p", "\[Equal]", 
    FractionBox[
     RowBox[{"mass", " ", "R", " ", "T"}], "V"]}], ",", 
   RowBox[{"U", "\[Equal]", 
    RowBox[{"cv", " ", "mass", " ", "T"}]}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.445859446416693*^9, 3.445860084428235*^9, {3.4458602019587326`*^9, 
   3.4458602252867084`*^9}, 3.445861313435994*^9, 3.4458615794967914`*^9, 
   3.5353724626970816`*^9, 3.535376326046875*^9, 3.535376458140625*^9, 
   3.535396339390625*^9, 3.53539638059375*^9, 3.53539645296875*^9, 
   3.5354554258435364`*^9, 3.5354581238063335`*^9, 3.535458228805044*^9, 
   3.535458912945425*^9, 3.535525985015625*^9, 3.5355263991875*^9, 
   3.535526464375*^9, 3.535526585515625*^9, 3.535526704640625*^9, 
   3.535541107125*^9, 3.568446774229931*^9, 3.568449494891624*^9, 
   3.5684505250969515`*^9, 3.5684505802234635`*^9, 3.568450684548895*^9, 
   3.5684510314770594`*^9, 3.568451062252059*^9, 3.568451203247059*^9, 
   3.5684548587246895`*^9, 3.5684568211619234`*^9, 3.568457452070836*^9, 
   3.5684588403088274`*^9, 3.568458973090104*^9, 3.568459054750269*^9, 
   3.56852133006837*^9, 3.5685221875664153`*^9, 3.568522307458415*^9, 
   3.571999396018319*^9, 3.572000368677112*^9, 3.5720004983752327`*^9, 
   3.572000553082075*^9, 3.572003899161022*^9, 3.5720050606547294`*^9, 
   3.5720086348184233`*^9, 3.572009245668502*^9, 3.572161169188203*^9, 
   3.572161459114193*^9, 3.572161672398519*^9, 3.5721676755898156`*^9, 
   3.5721679963638897`*^9, 3.57217374465268*^9, 3.5721741767118816`*^9, {
   3.5757769140643883`*^9, 3.575776936779703*^9}, {3.5757770230666094`*^9, 
   3.5757770302324715`*^9}, 3.5757998727678995`*^9, 3.577450625317581*^9, 
   3.577450659798029*^9}]
}, Open  ]],

Cell["Solving for dotp,dotT,m, and U", "Text"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"eqdotp", ",", "eqp", ",", "eqdotS"}], "}"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"dotp", "\[Equal]", 
    FractionBox[
     RowBox[{"dotT", " ", "mass", " ", "R"}], "V"]}], ",", 
   RowBox[{"p", "\[Equal]", 
    FractionBox[
     RowBox[{"mass", " ", "R", " ", "T"}], "V"]}], ",", 
   RowBox[{
    RowBox[{"dotE", "-", 
     RowBox[{"dotp", " ", "V"}]}], "\[Equal]", 
    RowBox[{
     RowBox[{"dotSew", " ", "T"}], "+", 
     RowBox[{"dotSq", " ", "T"}]}]}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.4458594464791927`*^9, 3.445860084506359*^9, {3.4458602020524817`*^9, 
   3.445860225364833*^9}, 3.445861313482869*^9, 3.445861579559291*^9, 
   3.535372462759538*^9, 3.535376458265625*^9, 3.535396339484375*^9, 
   3.535396380671875*^9, 3.535396453046875*^9, 3.535455425859161*^9, 
   3.5354581238375835`*^9, 3.535458228820669*^9, 3.5354589129610496`*^9, 
   3.535525985078125*^9, 3.53552639928125*^9, 3.535526464453125*^9, 
   3.535526585609375*^9, 3.535526704734375*^9, 3.535541107203125*^9, 
   3.568446774491931*^9, 3.568449494936633*^9, 3.5684505251369553`*^9, 
   3.568450580268468*^9, 3.568450684579898*^9, 3.5684510315220594`*^9, 
   3.568451062297059*^9, 3.568451203282059*^9, 3.5684548587626934`*^9, 
   3.5684568212079277`*^9, 3.568457452115836*^9, 3.5684588403618326`*^9, 
   3.5684589731351085`*^9, 3.568459054798274*^9, 3.5685213300943727`*^9, 
   3.568522187611415*^9, 3.568522307515415*^9, 3.571999396049522*^9, 
   3.5720003686927123`*^9, 3.5720004984064326`*^9, 3.572000553113275*^9, 
   3.572003899176622*^9, 3.5720050606859293`*^9, 3.5720086348494263`*^9, 
   3.572009245695505*^9, 3.5721611692152057`*^9, 3.572161459137195*^9, 
   3.572161672416521*^9, 3.572167675613818*^9, 3.572167996391893*^9, 
   3.572173744681683*^9, 3.5721741767388844`*^9, {3.5757769140800004`*^9, 
   3.575776936795315*^9}, {3.575777023082221*^9, 3.575777030248083*^9}, 
   3.5757998728008995`*^9, 3.5774506253565855`*^9, 3.5774506598250318`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqs", " ", "=", " ", 
  RowBox[{"Simplify", "[", 
   RowBox[{"Solve", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"eqdotp", ",", "eqdotT", ",", "eqp", ",", "eqU"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"dotp", ",", "dotT", ",", "mass", ",", "U"}], "}"}]}], "]"}], 
   "]"}]}]], "Input",
 CellChangeTimes->{3.535458868210401*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"dotp", "\[Rule]", 
     FractionBox[
      RowBox[{"dotE", " ", "R"}], 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]}], ",", 
    RowBox[{"dotT", "\[Rule]", 
     FractionBox[
      RowBox[{"dotE", " ", "R", " ", "T"}], 
      RowBox[{
       RowBox[{"cv", " ", "p", " ", "V"}], "+", 
       RowBox[{"p", " ", "R", " ", "V"}]}]]}], ",", 
    RowBox[{"mass", "\[Rule]", 
     FractionBox[
      RowBox[{"p", " ", "V"}], 
      RowBox[{"R", " ", "T"}]]}], ",", 
    RowBox[{"U", "\[Rule]", 
     FractionBox[
      RowBox[{"cv", " ", "p", " ", "V"}], "R"]}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.44585944694794*^9, 3.445860084740733*^9, {3.4458602040680943`*^9, 
   3.4458602255992064`*^9}, 3.4458613136859927`*^9, 3.44586157968429*^9, 
   3.535372463571471*^9, 3.53537645865625*^9, 3.535396339859375*^9, 
   3.53539638084375*^9, 3.5353964531875*^9, 3.53545542589041*^9, 
   3.535458123853208*^9, 3.535458228867543*^9, 3.535458913007924*^9, 
   3.53552598528125*^9, 3.53552639946875*^9, 3.535526464640625*^9, 
   3.535526585796875*^9, 3.535526704953125*^9, 3.535541107828125*^9, 
   3.5684467745729313`*^9, 3.568449494996645*^9, 3.5684505251879606`*^9, 
   3.5684505803574767`*^9, 3.5684506846309032`*^9, 3.568451031599059*^9, 
   3.5684510623430595`*^9, 3.568451203329059*^9, 3.568454858808698*^9, 
   3.5684568212599335`*^9, 3.568457452175836*^9, 3.5684588404238386`*^9, 
   3.5684589731881137`*^9, 3.5684590548472786`*^9, 3.568521330139377*^9, 
   3.5685221876984153`*^9, 3.5685223075584154`*^9, 3.5719993961119275`*^9, 
   3.5720003687395124`*^9, 3.572000498453233*^9, 3.5720005531912756`*^9, 
   3.572003899207822*^9, 3.5720050607171297`*^9, 3.5720086349124327`*^9, 
   3.572009245761512*^9, 3.572161169287213*^9, 3.5721614591731987`*^9, 
   3.572161672447524*^9, 3.572167675648822*^9, 3.5721679964308968`*^9, 
   3.5721737447226872`*^9, 3.572174176781889*^9, {3.575776914126836*^9, 
   3.5757769368265386`*^9}, {3.575777023129057*^9, 3.575777030294919*^9}, 
   3.5757998728428993`*^9, 3.577450625410591*^9, 3.577450659860035*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"dp", " ", "=", " ", 
  RowBox[{"Collect", "[", 
   RowBox[{
    RowBox[{"dotp", "/.", 
     RowBox[{"eqs", "[", 
      RowBox[{"[", "1", "]"}], "]"}]}], ",", 
    RowBox[{"{", 
     RowBox[{"qm", ",", "dotv"}], "}"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"dotE", " ", "R"}], 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]], "Output",
 CellChangeTimes->{
  3.445859447088564*^9, 3.445860084818857*^9, {3.445860204427467*^9, 
   3.4458602257398305`*^9}, 3.445861313826617*^9, 3.445861579731165*^9, 
   3.535372464742529*^9, 3.535376458734375*^9, 3.535396339953125*^9, 
   3.535396380984375*^9, 3.535396453265625*^9, 3.5354554259060345`*^9, 
   3.5354581238844576`*^9, 3.5354582288831677`*^9, 3.535458913023549*^9, 
   3.535525985703125*^9, 3.5355263995625*^9, 3.535526464765625*^9, 
   3.535526585953125*^9, 3.5355267050625*^9, 3.535541108546875*^9, 
   3.568446774637931*^9, 3.5684494950346527`*^9, 3.5684505252199636`*^9, 
   3.5684505803924804`*^9, 3.568450684670907*^9, 3.568451031638059*^9, 
   3.568451062372059*^9, 3.568451203356059*^9, 3.5684548588507023`*^9, 
   3.568456821305938*^9, 3.568457452218836*^9, 3.568458840469843*^9, 
   3.5684589734821434`*^9, 3.5684590548752813`*^9, 3.5685213301633797`*^9, 
   3.5685221880794153`*^9, 3.568522307585415*^9, 3.5719993961431303`*^9, 
   3.5720003687551126`*^9, 3.572000498468833*^9, 3.5720005532224755`*^9, 
   3.5720038992390223`*^9, 3.57200506074833*^9, 3.5720086349474363`*^9, 
   3.572009245788514*^9, 3.5721611693132153`*^9, 3.572161459197201*^9, 
   3.572161672466526*^9, 3.572167675672824*^9, 3.572167996457899*^9, 
   3.57217374475169*^9, 3.572174176804891*^9, {3.575776914142448*^9, 
   3.5757769368577623`*^9}, {3.5757770231446686`*^9, 3.5757770303105307`*^9}, 
   3.5757998728688993`*^9, 3.5774506254395933`*^9, 3.5774506598840375`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"dT", "=", "  ", 
  RowBox[{"Collect", "[", 
   RowBox[{
    RowBox[{"dotT", "/.", 
     RowBox[{"eqs", "[", 
      RowBox[{"[", "1", "]"}], "]"}]}], ",", 
    RowBox[{"{", 
     RowBox[{"qm", ",", "dotv"}], "}"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"dotE", " ", "R", " ", "T"}], 
  RowBox[{
   RowBox[{"cv", " ", "p", " ", "V"}], "+", 
   RowBox[{"p", " ", "R", " ", "V"}]}]]], "Output",
 CellChangeTimes->{
  3.445859447151064*^9, 3.4458600849126067`*^9, {3.4458602045368414`*^9, 
   3.4458602257710805`*^9}, 3.4458613138891163`*^9, 3.445861579871789*^9, 
   3.5353724651797237`*^9, 3.5353764588125*^9, 3.535396340078125*^9, 
   3.53539638109375*^9, 3.53539645334375*^9, 3.535455425937284*^9, 
   3.5354581239000826`*^9, 3.5354582289144173`*^9, 3.535458913039174*^9, 
   3.53552598584375*^9, 3.53552639965625*^9, 3.53552646484375*^9, 
   3.535526586046875*^9, 3.53552670515625*^9, 3.535541108625*^9, 
   3.5684467746919312`*^9, 3.5684494950606575`*^9, 3.5684505252459664`*^9, 
   3.568450580450486*^9, 3.568450684706911*^9, 3.568451031671059*^9, 
   3.5684510624090595`*^9, 3.5684512033850594`*^9, 3.568454858888706*^9, 
   3.568456821351942*^9, 3.5684574522608356`*^9, 3.568458840525849*^9, 
   3.568458973522147*^9, 3.5684590549132853`*^9, 3.5685213302023835`*^9, 
   3.5685221881124153`*^9, 3.568522307634415*^9, 3.571999396174333*^9, 
   3.572000368786313*^9, 3.5720004985000334`*^9, 3.572000553253676*^9, 
   3.5720038992546225`*^9, 3.5720050607639303`*^9, 3.5720086349834394`*^9, 
   3.572009245814517*^9, 3.5721611693412185`*^9, 3.5721614592202034`*^9, 
   3.572161672487528*^9, 3.5721676756958265`*^9, 3.5721679964819016`*^9, 
   3.572173744780693*^9, 3.5721741768288937`*^9, {3.57577691415806*^9, 
   3.5757769368733745`*^9}, {3.575777023175893*^9, 3.575777030341755*^9}, 
   3.5757998728998995`*^9, 3.577450625470597*^9, 3.577450659922042*^9}]
}, Open  ]],

Cell["For the case of constant volume", "Text"],

Cell[BoxData[
 RowBox[{
  RowBox[{"dotv", " ", "=", " ", "0"}], ";"}]], "Input"],

Cell[CellGroupData[{

Cell[BoxData["dotp"], "Input"],

Cell[BoxData["dotp"], "Output",
 CellChangeTimes->{
  3.535396594625*^9, 3.5354554259529085`*^9, 3.5354581239313326`*^9, 
   3.5354582289456663`*^9, 3.535458913054799*^9, 3.53552598596875*^9, 
   3.535526399765625*^9, 3.535526464953125*^9, 3.535526586140625*^9, 
   3.535526705796875*^9, 3.535541108734375*^9, 3.568446774758931*^9, 
   3.5684494952777014`*^9, 3.5684505252859707`*^9, 3.5684505807215133`*^9, 
   3.5684506847509155`*^9, 3.5684510317220592`*^9, 3.568451062467059*^9, 
   3.5684512034230595`*^9, 3.56845485892771*^9, 3.568456821408948*^9, 
   3.568457452317836*^9, 3.568458840596856*^9, 3.5684589735771523`*^9, 
   3.56845905495529*^9, 3.568521330242388*^9, 3.568522188174415*^9, 
   3.568522307673415*^9, 3.571999396205536*^9, 3.5720003688175135`*^9, 
   3.5720004985468335`*^9, 3.572000553300476*^9, 3.572003899285823*^9, 
   3.5720050607951307`*^9, 3.572008635022444*^9, 3.57200924585052*^9, 
   3.572161169377222*^9, 3.5721614592522063`*^9, 3.5721616725145307`*^9, 
   3.5721676757308297`*^9, 3.5721679965169053`*^9, 3.572173744818697*^9, 
   3.572174176864897*^9, {3.5757769141892834`*^9, 3.575776936904598*^9}, {
   3.575777023207116*^9, 3.5757770303729787`*^9}, 3.5757998729388995`*^9, 
   3.577450625790629*^9, 3.5774506599550447`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqs", " ", "=", " ", 
  RowBox[{"Solve", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"eqdotp", ",", "eqdotT", ",", "eqU", ",", "eqp"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{"dotp", ",", "dotT", ",", "mass", ",", "U"}], "}"}]}], 
   "]"}]}]], "Input",
 CellChangeTimes->{3.5354588756793423`*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"dotp", "\[Rule]", 
     FractionBox[
      RowBox[{"dotE", " ", "R"}], 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]}], ",", 
    RowBox[{"dotT", "\[Rule]", 
     FractionBox[
      RowBox[{"dotE", " ", "R", " ", "T"}], 
      RowBox[{"p", " ", 
       RowBox[{"(", 
        RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]}], ",", 
    RowBox[{"mass", "\[Rule]", 
     FractionBox[
      RowBox[{"p", " ", "V"}], 
      RowBox[{"R", " ", "T"}]]}], ",", 
    RowBox[{"U", "\[Rule]", 
     FractionBox[
      RowBox[{"cv", " ", "p", " ", "V"}], "R"]}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.4458594473073125`*^9, 3.445860085068856*^9, {3.4458602046930904`*^9, 
   3.4458602258648295`*^9}, 3.4458613140297403`*^9, 3.445861579981163*^9, 
   3.5353724652734084`*^9, 3.535376459296875*^9, 3.535396340203125*^9, 
   3.53539638128125*^9, 3.535396453828125*^9, 3.53539659903125*^9, 
   3.5354554259997826`*^9, 3.535458123978207*^9, 3.535458228992541*^9, 
   3.535458913086049*^9, 3.5355259861875*^9, 3.535526399921875*^9, 
   3.535526465109375*^9, 3.53552658628125*^9, 3.53552670596875*^9, 
   3.535541108890625*^9, 3.568446774800931*^9, 3.56844949532171*^9, 
   3.5684505253349752`*^9, 3.5684505807655177`*^9, 3.568450684789919*^9, 
   3.568451031936059*^9, 3.5684510625100594`*^9, 3.5684512034580593`*^9, 
   3.5684548589707146`*^9, 3.5684568214539523`*^9, 3.5684574523648357`*^9, 
   3.568458840655862*^9, 3.5684589736231575`*^9, 3.5684590550072947`*^9, 
   3.568521330288392*^9, 3.568522188210415*^9, 3.568522307753415*^9, 
   3.5719993962367387`*^9, 3.572000368848713*^9, 3.5720004985780334`*^9, 
   3.5720005533472767`*^9, 3.572003899317023*^9, 3.57200506082633*^9, 
   3.5720086350604477`*^9, 3.572009245888524*^9, 3.5721611694092255`*^9, 
   3.5721614592852097`*^9, 3.572161672540533*^9, 3.572167675760833*^9, 
   3.5721679965479083`*^9, 3.5721737448527*^9, 3.5721741768969*^9, {
   3.5757769142205076`*^9, 3.57577693692021*^9}, {3.5757770232383404`*^9, 
   3.5757770303885903`*^9}, 3.5757998729778996`*^9, 3.577450626082658*^9, 
   3.5774506599910483`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"dp", " ", "=", " ", 
  RowBox[{"Collect", "[", 
   RowBox[{
    RowBox[{"dotp", "/.", 
     RowBox[{"eqs", "[", 
      RowBox[{"[", "1", "]"}], "]"}]}], ",", 
    RowBox[{"{", 
     RowBox[{"qm", ",", "dotS"}], "}"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"dotE", " ", "R"}], 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]], "Output",
 CellChangeTimes->{
  3.445859447354187*^9, 3.4458600852719793`*^9, {3.4458602048337145`*^9, 
   3.4458602258960795`*^9}, 3.4458613140922403`*^9, 3.445861580043663*^9, 
   3.535372465335865*^9, 3.53537645934375*^9, 3.5353963403125*^9, 
   3.535396381390625*^9, 3.535396453921875*^9, 3.5354554260154066`*^9, 
   3.535458123993832*^9, 3.5354582290081654`*^9, 3.5354589131016736`*^9, 
   3.53552598628125*^9, 3.535526400015625*^9, 3.535526465203125*^9, 
   3.535526586359375*^9, 3.5355267060625*^9, 3.53554110959375*^9, 
   3.5684467748729315`*^9, 3.5684494953717203`*^9, 3.5684505253779793`*^9, 
   3.568450580827524*^9, 3.568450684838924*^9, 3.5684510319680595`*^9, 
   3.568451062542059*^9, 3.5684512034890594`*^9, 3.568454859016719*^9, 
   3.5684568215059576`*^9, 3.568457452407836*^9, 3.5684588409748936`*^9, 
   3.5684589736741624`*^9, 3.568459055047299*^9, 3.568521330338397*^9, 
   3.568522188255415*^9, 3.568522307804415*^9, 3.5719993962679415`*^9, 
   3.5720003688799133`*^9, 3.572000498609234*^9, 3.572000553550078*^9, 
   3.572003899348223*^9, 3.5720050608575306`*^9, 3.5720086350904503`*^9, 
   3.572009245918527*^9, 3.5721611694352274`*^9, 3.572161459309212*^9, 
   3.572161672558535*^9, 3.572167675784835*^9, 3.5721679965739107`*^9, 
   3.572173744880703*^9, 3.5721741769209023`*^9, {3.5757769142361193`*^9, 
   3.575776936951434*^9}, {3.575777023253952*^9, 3.575777030419814*^9}, 
   3.5757998730069*^9, 3.577450626116661*^9, 3.577450660015051*^9}]
}, Open  ]],

Cell["\<\
The pressure is a function of the entropy flow dotS only. The massflow enters \
only inderectly since it affects T. \
\>", "Text"],

Cell["The energy-pressure capacitance is defined as", "Text"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Cep", " ", "=", " ", 
  RowBox[{"dotE", "/", "dp"}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{"(", 
    RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}], "R"]], "Output",
 CellChangeTimes->{
  3.445859447416687*^9, 3.4458600853501043`*^9, {3.4458602049118385`*^9, 
   3.445860225927329*^9}, 3.445861314139115*^9, 3.4458615800905375`*^9, 
   3.535372465398321*^9, 3.53537645940625*^9, 3.53539634040625*^9, 
   3.535396381546875*^9, 3.535396454015625*^9, 3.5354554260310316`*^9, 
   3.535458124025082*^9, 3.535458229039415*^9, 3.5354589131172986`*^9, 
   3.535525986375*^9, 3.53552640009375*^9, 3.535526465296875*^9, 
   3.5355265864375*^9, 3.53552670615625*^9, 3.5355411096875*^9, 
   3.568446774942931*^9, 3.5684494954197297`*^9, 3.5684505254189835`*^9, 
   3.5684505808655276`*^9, 3.568450684875928*^9, 3.568451031997059*^9, 
   3.568451062585059*^9, 3.5684512035170593`*^9, 3.568454859065724*^9, 
   3.5684568215519624`*^9, 3.568457452719836*^9, 3.568458841025899*^9, 
   3.568458973713166*^9, 3.5684590550803022`*^9, 3.5685213303654*^9, 
   3.568522188279415*^9, 3.5685223082704153`*^9, 3.5719993962991447`*^9, 
   3.5720003689111137`*^9, 3.572000498624834*^9, 3.572000553581278*^9, 
   3.572003899363823*^9, 3.572005060888731*^9, 3.5720086351224537`*^9, 
   3.57200924594553*^9, 3.5721611694642305`*^9, 3.5721614593342147`*^9, 
   3.572161672576537*^9, 3.5721676758078375`*^9, 3.5721679966039143`*^9, 
   3.5721737449087057`*^9, 3.5721741769489055`*^9, {3.5757769142673435`*^9, 
   3.575776936967046*^9}, {3.5757770232851763`*^9, 3.575777030435426*^9}, 
   3.5757998730308995`*^9, 3.577450626153665*^9, 3.5774506600380535`*^9}]
}, Open  ]],

Cell[BoxData[
 FormBox[
  RowBox[{
   RowBox[{"When", " ", "solving", " ", "the", " ", "equation"}], ",", " ", 
   RowBox[{
   "temperature", " ", "and", " ", "mass", "  ", "are", " ", "reduced", " ", 
    "to", " ", "\"\<book-keeping variables\>\"", " ", "that", " ", "can", " ",
     "be", " ", "calculated", " ", "after", " ", "the", " ", "pressure", " ", 
    "has", " ", "been", " ", 
    RowBox[{"calculated", "."}]}]}], TextForm]], "Text"],

Cell["The mass can be calculated from", "Text"],

Cell[BoxData[
 RowBox[{"mexpr0", "=."}]], "Input",
 CellChangeTimes->{{3.535526390484375*^9, 3.53552639084375*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemEquationsDA", "=", " ", 
   RowBox[{"{", 
    RowBox[{"mass", " ", "==", " ", 
     FractionBox[
      RowBox[{"qmp1", "+", "qmp2"}], "s"]}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535430156909875*^9, 3.535430207704972*^9}, {
   3.5354328163620415`*^9, 3.535432889533148*^9}, 3.535525965859375*^9, {
   3.5355264545*^9, 3.535526457390625*^9}, {3.568455142797043*^9, 
   3.5684551435060425`*^9}, {3.568455182633043*^9, 3.5684552084050426`*^9}, {
   3.5720183319802775`*^9, 3.572018335221463*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemVariables", "=", 
   RowBox[{"{", "mass", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535432839934885*^9, 3.535432882940875*^9}, {
  3.568455146335043*^9, 3.568455147005043*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"T", " ", "=", " ", "Tav"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"p", " ", "=", " ", "pav"}], ";"}]}], "Input"],

Cell["The temperature can be calculated as", "Text"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Texpr", " ", "=", " ", 
  RowBox[{"T", "/.", 
   RowBox[{
    RowBox[{"Solve", "[", 
     RowBox[{"eqp", ",", "T"}], "]"}], "[", 
    RowBox[{"[", "1", "]"}], "]"}]}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"pav", " ", "V"}], 
  RowBox[{"mass", " ", "R"}]]], "Output",
 CellChangeTimes->{
  3.44585944768231*^9, 3.4458600856157274`*^9, {3.4458602057555833`*^9, 
   3.445860226224202*^9}, 3.4458613143578634`*^9, 3.445861580278036*^9, 
   3.5353724672407846`*^9, 3.535376459703125*^9, 3.53539634075*^9, 
   3.5353963819375*^9, 3.53539645428125*^9, 3.5354554261091547`*^9, 
   3.5354581240875816`*^9, 3.5354582291019135`*^9, 3.535458913179798*^9, 
   3.535525987*^9, 3.535526400390625*^9, 3.535526465578125*^9, 
   3.535526586640625*^9, 3.535526706953125*^9, 3.535541109921875*^9, 
   3.5684467751039314`*^9, 3.568449495529752*^9, 3.5684505255119925`*^9, 
   3.568450580974539*^9, 3.568450685158956*^9, 3.568451032119059*^9, 
   3.568451062884059*^9, 3.5684512037940593`*^9, 3.5684548593807554`*^9, 
   3.5684568216519723`*^9, 3.568457452821836*^9, 3.568458841121908*^9, 
   3.5684589738021755`*^9, 3.5684590551883125`*^9, 3.568521330436407*^9, 
   3.568522188391415*^9, 3.568522308442415*^9, 3.5719993963771515`*^9, 
   3.5720003689891143`*^9, 3.572000498702834*^9, 3.5720005536748786`*^9, 
   3.5720038994262238`*^9, 3.572005060951131*^9, 3.5720086352004614`*^9, 
   3.572009246029538*^9, 3.5721611695402384`*^9, 3.572161459398221*^9, 
   3.5721616726245413`*^9, 3.5721676758688436`*^9, 3.5721679966659203`*^9, 
   3.5721737449757123`*^9, 3.5721741770119114`*^9, {3.5757769143141785`*^9, 
   3.5757769370138817`*^9}, {3.575777023347624*^9, 3.575777030497874*^9}, 
   3.5757998730989*^9, 3.577450626249675*^9, 3.5774506601050596`*^9}]
}, Open  ]],

Cell["This is to be preffered from a numerical point of view", "Text"],

Cell[BoxData[
 FormBox[
  RowBox[{"fak", "=", 
   FractionBox["1", 
    RowBox[{"1", "-", "alfa"}]]}], TextForm]], "Text"],

Cell[BoxData[
 FractionBox["1", 
  RowBox[{"1", "-", "alfa"}]]], "Output"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ZcEPexpr", " ", "=", " ", 
  FractionBox[
   RowBox[{"fak", " ", "h"}], "Cep"]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"fak", " ", "mTimestep", " ", "R"}], 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]], "Output",
 CellChangeTimes->{
  3.4458594477760596`*^9, 3.4458600857719765`*^9, {3.445860206036832*^9, 
   3.445860226302327*^9}, 3.4458613144828625`*^9, 3.445861580387411*^9, 
   3.535372467787278*^9, 3.5353764598125*^9, 3.535396340984375*^9, 
   3.53539638259375*^9, 3.53539645446875*^9, 3.535455426124779*^9, 
   3.535458124118831*^9, 3.5354582291175385`*^9, 3.535458913195423*^9, 
   3.535525987109375*^9, 3.53552640046875*^9, 3.53552646565625*^9, 
   3.53552658671875*^9, 3.535526707046875*^9, 3.535541110609375*^9, 
   3.5684467751369314`*^9, 3.5684494955697594`*^9, 3.568450525553997*^9, 
   3.5684505810315447`*^9, 3.568450685207961*^9, 3.5684510321560593`*^9, 
   3.5684510629190593`*^9, 3.568451203829059*^9, 3.56845485942776*^9, 
   3.5684568217049775`*^9, 3.568457452861836*^9, 3.568458841163913*^9, 
   3.5684589738381786`*^9, 3.5684590554813423`*^9, 3.5685213304824114`*^9, 
   3.5685221884194155`*^9, 3.568522308505415*^9, 3.5719993965955706`*^9, 
   3.572000369020314*^9, 3.5720004987340345`*^9, 3.5720005537060785`*^9, 
   3.5720038994418235`*^9, 3.572005060966731*^9, 3.572008635228464*^9, 
   3.572009246060541*^9, 3.572161169568241*^9, 3.5721614594222236`*^9, 
   3.5721616726435432`*^9, 3.572167675893846*^9, 3.572167996691923*^9, 
   3.5721737450037155`*^9, 3.572174177035914*^9, {3.575776914329791*^9, 
   3.575776937045105*^9}, {3.575777023378847*^9, 3.5757770305290976`*^9}, 
   3.5757998731249*^9, 3.5774506262876787`*^9, 3.5774506601310625`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Zc1e", "=", 
  FractionBox[
   RowBox[{"mTimestep", " ", "cfuel", " ", "rhofuel", " ", "fak"}], 
   "Cep"]}]], "Input",
 CellChangeTimes->{{3.5721971124820213`*^9, 3.5721971136060853`*^9}}],

Cell[BoxData[
 FractionBox[
  RowBox[{"cfuel", " ", "fak", " ", "mTimestep", " ", "R", " ", "rhofuel"}], 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]], "Output",
 CellChangeTimes->{{3.5757769143610144`*^9, 3.575776937060717*^9}, {
   3.5757770233944592`*^9, 3.5757770305603213`*^9}, 3.5757998731509*^9, 
   3.5774506263186817`*^9, 3.5774506601580653`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["h"], "Input",
 CellChangeTimes->{3.53539653621875*^9}],

Cell[BoxData["mTimestep"], "Output",
 CellChangeTimes->{
  3.535396536796875*^9, 3.5354554261404037`*^9, 3.535458124134456*^9, 
   3.535458229133163*^9, 3.535458913211048*^9, 3.535525987203125*^9, 
   3.535526400546875*^9, 3.535526465734375*^9, 3.535526586796875*^9, 
   3.535526707140625*^9, 3.5355411106875*^9, 3.5684467752009315`*^9, 
   3.5684494956207695`*^9, 3.5684505257770195`*^9, 3.568450581077549*^9, 
   3.5684506852429647`*^9, 3.5684510321820593`*^9, 3.568451062979059*^9, 
   3.5684512038570595`*^9, 3.5684548594687643`*^9, 3.568456821754983*^9, 
   3.5684574529048357`*^9, 3.5684588412149177`*^9, 3.5684589738731823`*^9, 
   3.5684590555143456`*^9, 3.5685213305114145`*^9, 3.5685221884554152`*^9, 
   3.568522308576415*^9, 3.571999396626774*^9, 3.5720003690515146`*^9, 
   3.572000498765235*^9, 3.572000553737279*^9, 3.572003899473024*^9, 
   3.5720050609979315`*^9, 3.5720086352574673`*^9, 3.5720092462725625`*^9, 
   3.5721611695942435`*^9, 3.572161459447226*^9, 3.572161672662545*^9, 
   3.5721676759178486`*^9, 3.5721679967209253`*^9, 3.572173745033718*^9, 
   3.5721741770599165`*^9, {3.5757769143766265`*^9, 3.575776937076329*^9}, {
   3.575777023425683*^9, 3.575777030591545*^9}, 3.5757998731828995`*^9, 
   3.577450626362686*^9, 3.577450660185068*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["Cep"], "Input",
 CellChangeTimes->{{3.535396539625*^9, 3.535396540234375*^9}}],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{"(", 
    RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}], "R"]], "Output",
 CellChangeTimes->{
  3.535396540953125*^9, 3.535455426171653*^9, 3.5354581241657057`*^9, 
   3.5354582291644125`*^9, 3.535458913226673*^9, 3.535525987296875*^9, 
   3.5355264011875*^9, 3.535526466390625*^9, 3.535526586859375*^9, 
   3.53552670721875*^9, 3.53554111078125*^9, 3.5684467752509313`*^9, 
   3.5684494956467752`*^9, 3.568450525809023*^9, 3.568450581132554*^9, 
   3.568450685278968*^9, 3.5684510322250595`*^9, 3.568451063014059*^9, 
   3.5684512038850594`*^9, 3.568454859506768*^9, 3.5684568217919865`*^9, 
   3.568457452958836*^9, 3.5684588412619224`*^9, 3.568458973911186*^9, 
   3.5684590555463486`*^9, 3.5685213309094543`*^9, 3.568522188482415*^9, 
   3.5685223086054153`*^9, 3.571999396657976*^9, 3.572000369067115*^9, 
   3.572000498952436*^9, 3.5720005537684793`*^9, 3.572003899488624*^9, 
   3.5720050610135317`*^9, 3.57200863528647*^9, 3.572009246317567*^9, 
   3.572161169619246*^9, 3.572161459472228*^9, 3.5721616726845474`*^9, 
   3.572167675942851*^9, 3.572167996745928*^9, 3.5721737450627213`*^9, 
   3.5721741770869193`*^9, {3.5757769144078503`*^9, 3.575776937091941*^9}, {
   3.5757770234412947`*^9, 3.575777030607157*^9}, 3.5757998732078996`*^9, 
   3.5774506263966894`*^9, 3.577450660214071*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell["Characteristics", "Subsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"c", " ", "=", " ", 
  RowBox[{"{", 
   RowBox[{"cp1", ",", "cp2"}], "}"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"cp1", ",", "cp2"}], "}"}]], "Output",
 CellChangeTimes->{
  3.445859447838559*^9, 3.4458600858657255`*^9, 3.445860226380451*^9, 
   3.445861314560987*^9, 3.44586158044991*^9, 3.535372467865349*^9, 
   3.535376490375*^9, 3.535396341421875*^9, 3.53539638278125*^9, 
   3.5353964549375*^9, 3.535455426187278*^9, 3.5354581241813307`*^9, 
   3.5354582291800375`*^9, 3.535458913242298*^9, 3.535525987390625*^9, 
   3.53552640128125*^9, 3.53552646653125*^9, 3.53552658746875*^9, 
   3.53552670784375*^9, 3.535541110859375*^9, 3.5684467755169315`*^9, 
   3.5684494957057867`*^9, 3.568450525841026*^9, 3.568450581166558*^9, 
   3.568450685312971*^9, 3.568451032275059*^9, 3.5684510630670595`*^9, 
   3.5684512039180593`*^9, 3.568454859537771*^9, 3.568456821866994*^9, 
   3.568457453006836*^9, 3.568458841304927*^9, 3.56845897394919*^9, 
   3.5684590555733514`*^9, 3.5685213309424577`*^9, 3.5685221885074153`*^9, 
   3.568522308675415*^9, 3.5719993966735783`*^9, 3.572000369269916*^9, 
   3.572000498999236*^9, 3.5720005537996798`*^9, 3.572003899519824*^9, 
   3.572005061044732*^9, 3.5720086354434857`*^9, 3.57200924635157*^9, 
   3.5721611696472487`*^9, 3.5721614594952307`*^9, 3.5721616727035494`*^9, 
   3.572167675966853*^9, 3.5721679967739305`*^9, 3.572173745091724*^9, 
   3.572174177113922*^9, {3.575776914423462*^9, 3.575776937123165*^9}, {
   3.575777023472519*^9, 3.575777030638381*^9}, 3.5757998732368994`*^9, 
   3.5774506264326925`*^9, 3.577450660244074*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"q", " ", "=", " ", 
  RowBox[{"{", 
   RowBox[{"qmp1", ",", "qmp2", ",", "dEp1", ",", "dEp2"}], "}"}]}]], "Input",
 CellChangeTimes->{{3.5684503894803915`*^9, 3.5684503937628193`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"qmp1", ",", "qmp2", ",", "dEp1", ",", "dEp2"}], "}"}]], "Output",
 CellChangeTimes->{
  3.4458594479166837`*^9, 3.4458600859438505`*^9, 3.4458602264742007`*^9, 
   3.4458613146391115`*^9, 3.44586158051241*^9, 3.5353724679434195`*^9, 
   3.5353765025*^9, 3.535396341515625*^9, 3.535396382875*^9, 
   3.5353964550625*^9, 3.535455426202902*^9, 3.5354581241969557`*^9, 
   3.5354582291956615`*^9, 3.535458913257923*^9, 3.5355259878125*^9, 
   3.535526401375*^9, 3.53552646665625*^9, 3.535526587546875*^9, 
   3.53552670796875*^9, 3.535541110953125*^9, 3.568446775553931*^9, 
   3.568449495755797*^9, 3.56845052588203*^9, 3.5684505812165627`*^9, 
   3.5684506853519754`*^9, 3.5684510323070593`*^9, 3.568451063118059*^9, 
   3.568451203946059*^9, 3.568454859575775*^9, 3.5684568219209995`*^9, 
   3.5684574530558357`*^9, 3.568458841350931*^9, 3.568458973984193*^9, 
   3.568459055609355*^9, 3.568521330984462*^9, 3.568522188575415*^9, 
   3.5685223087054152`*^9, 3.5719993967047806`*^9, 3.572000369301116*^9, 
   3.5720004990148363`*^9, 3.5720005538308797`*^9, 3.5720038995510244`*^9, 
   3.572005061075932*^9, 3.5720086354934907`*^9, 3.5720092463825736`*^9, 
   3.5721611697572603`*^9, 3.572161459519233*^9, 3.5721616727225513`*^9, 
   3.572167675991856*^9, 3.5721679967989335`*^9, 3.572173745119727*^9, 
   3.572174177142925*^9, {3.575776914454686*^9, 3.575776937138777*^9}, {
   3.5757770234881306`*^9, 3.5757770306539927`*^9}, 3.5757998732718997`*^9, 
   3.577450626463696*^9, 3.5774506602740765`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"dE", " ", "=", " ", 
  RowBox[{"{", 
   RowBox[{"dEp1", ",", "dEp2"}], "}"}]}]], "Input",
 CellChangeTimes->{{3.5684503952289658`*^9, 3.5684503959470377`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"dEp1", ",", "dEp2"}], "}"}]], "Output",
 CellChangeTimes->{
  3.445859447979183*^9, 3.4458600860219746`*^9, 3.4458602265367002`*^9, 
   3.4458613146859865`*^9, 3.4458615805749097`*^9, 3.5353724680058756`*^9, 
   3.53537650521875*^9, 3.535396341625*^9, 3.535396382984375*^9, 
   3.53539645515625*^9, 3.535455426218527*^9, 3.5354581242282057`*^9, 
   3.5354582292269115`*^9, 3.535458913289172*^9, 3.53552598790625*^9, 
   3.535526401453125*^9, 3.535526466828125*^9, 3.535526587625*^9, 
   3.5355267080625*^9, 3.53554111165625*^9, 3.568446775606931*^9, 
   3.5684494957978053`*^9, 3.568450525914033*^9, 3.568450581263568*^9, 
   3.5684506853829784`*^9, 3.5684510323590593`*^9, 3.5684510631680593`*^9, 
   3.5684512039770594`*^9, 3.5684548596217794`*^9, 3.5684568222630334`*^9, 
   3.568457453093836*^9, 3.568458841395936*^9, 3.568458974035198*^9, 
   3.5684590556423583`*^9, 3.5685213310124645`*^9, 3.5685221886034155`*^9, 
   3.568522308758415*^9, 3.571999396735984*^9, 3.572000369316716*^9, 
   3.5720004990460367`*^9, 3.5720005538620796`*^9, 3.5720038995666246`*^9, 
   3.572005061091532*^9, 3.572008635523494*^9, 3.5720092464145765`*^9, 
   3.5721611697862625`*^9, 3.572161459543236*^9, 3.5721616727425537`*^9, 
   3.572167676018859*^9, 3.572167996824936*^9, 3.57217374525074*^9, 
   3.5721741771669273`*^9, {3.575776914470298*^9, 3.5757769371543884`*^9}, {
   3.5757770235193543`*^9, 3.575777030685217*^9}, 3.5757998732969*^9, 
   3.577450626509701*^9, 3.5774506603000793`*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{"ZcEP", "=."}]], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"zc", "=", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"ZcEP", ",", "0"}], "}"}], ",", "\n", "\t\t", 
    RowBox[{"{", 
     RowBox[{"0", ",", "ZcEP"}], "}"}]}], "}"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"ZcEP", ",", "0"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"0", ",", "ZcEP"}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.4458594481354322`*^9, 3.4458600862094736`*^9, 3.4458602267398243`*^9, 
   3.445861314842235*^9, 3.445861580637409*^9, 3.5353724680995607`*^9, 
   3.535376517328125*^9, 3.535396341734375*^9, 3.5353963831875*^9, 
   3.535396455265625*^9, 3.535455426249776*^9, 3.5354581242594557`*^9, 
   3.535458229242536*^9, 3.535458913304797*^9, 3.53552598803125*^9, 
   3.5355264015625*^9, 3.535526467609375*^9, 3.535526587734375*^9, 
   3.535526708171875*^9, 3.53554111178125*^9, 3.568446775753931*^9, 
   3.568449495863818*^9, 3.5684505259720387`*^9, 3.568450581318573*^9, 
   3.568450685445985*^9, 3.5684510324180593`*^9, 3.5684510632270594`*^9, 
   3.5684512040150595`*^9, 3.5684548596927867`*^9, 3.5684568223140383`*^9, 
   3.568457453149836*^9, 3.568458841450941*^9, 3.5684589740792027`*^9, 
   3.568459055693363*^9, 3.568521331108474*^9, 3.568522188681415*^9, 
   3.5685223088224154`*^9, 3.5719993967827873`*^9, 3.572000369363517*^9, 
   3.572000499077237*^9, 3.57200055390888*^9, 3.572003899597825*^9, 
   3.572005061122732*^9, 3.572008635564498*^9, 3.5720092464525805`*^9, 
   3.572161169821266*^9, 3.572161459577239*^9, 3.572161672769556*^9, 
   3.572167676052862*^9, 3.5721679969669504`*^9, 3.5721737452927437`*^9, 
   3.5721741772049313`*^9, {3.5757769146108046`*^9, 3.5757769371856127`*^9}, {
   3.575777023550578*^9, 3.5757770308413353`*^9}, 3.5757998733338995`*^9, 
   3.577450626851735*^9, 3.5774506603410835`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"cd", "=", 
  RowBox[{"{", 
   RowBox[{"cdp1expr", ",", "cdp2expr"}], "}"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"cp2", "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{"dEp2", "+", 
       RowBox[{
        FractionBox["1", "2"], " ", "ka", " ", 
        RowBox[{"(", 
         RowBox[{"T0", "-", "Tav"}], ")"}]}]}], ")"}], " ", "ZcEP"}]}], ",", 
   RowBox[{"cp1", "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{"dEp1", "+", 
       RowBox[{
        FractionBox["1", "2"], " ", "ka", " ", 
        RowBox[{"(", 
         RowBox[{"T0", "-", "Tav"}], ")"}]}]}], ")"}], " ", "ZcEP"}]}]}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.445859448197932*^9, 3.4458600862875977`*^9, 3.4458602268179483`*^9, 
   3.4458613149203596`*^9, 3.4458615806999087`*^9, 3.535372468162017*^9, 
   3.535376521453125*^9, 3.53539634184375*^9, 3.53539638328125*^9, 
   3.535396455359375*^9, 3.5354554262654004`*^9, 3.5354581242750807`*^9, 
   3.535458229273785*^9, 3.535458913320422*^9, 3.535525988125*^9, 
   3.535526401640625*^9, 3.53552646796875*^9, 3.5355265878125*^9, 
   3.535526708265625*^9, 3.535541111859375*^9, 3.568446775991931*^9, 
   3.5684494959058266`*^9, 3.5684505260180435`*^9, 3.568450581369578*^9, 
   3.5684506854829884`*^9, 3.5684510324510593`*^9, 3.568451063280059*^9, 
   3.568451204042059*^9, 3.56845485972679*^9, 3.568456822368044*^9, 
   3.568457453189836*^9, 3.5684588414899454`*^9, 3.568458974113206*^9, 
   3.568459055724366*^9, 3.5685213311364765`*^9, 3.568522188736415*^9, 
   3.568522309189415*^9, 3.5719993968139906`*^9, 3.5720003693947167`*^9, 
   3.5720004991084375`*^9, 3.5720005539400806`*^9, 3.5720038996290245`*^9, 
   3.5720050611539326`*^9, 3.572008635595501*^9, 3.5720092464815836`*^9, 
   3.572161169847269*^9, 3.572161459601241*^9, 3.572161672788558*^9, 
   3.5721676760768642`*^9, 3.572167996996953*^9, 3.572173745324747*^9, 
   3.5721741772309337`*^9, {3.5757769146264167`*^9, 3.5757769372012243`*^9}, {
   3.575777023581802*^9, 3.5757770308725595`*^9}, 3.5757998733588996`*^9, 
   3.577450626894739*^9, 3.5774506603720865`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"dEk", " ", "=", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{
     FractionBox["ka", "2"], " ", 
     RowBox[{"(", 
      RowBox[{"T0", "-", "Tav"}], ")"}]}], ",", 
    RowBox[{
     FractionBox["ka", "2"], " ", 
     RowBox[{"(", 
      RowBox[{"T0", "-", "Tav"}], ")"}]}]}], "}"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{
    FractionBox["1", "2"], " ", "ka", " ", 
    RowBox[{"(", 
     RowBox[{"T0", "-", "Tav"}], ")"}]}], ",", 
   RowBox[{
    FractionBox["1", "2"], " ", "ka", " ", 
    RowBox[{"(", 
     RowBox[{"T0", "-", "Tav"}], ")"}]}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.4458594482448063`*^9, 3.4458600863657227`*^9, 3.4458602268960733`*^9, 
   3.445861314982859*^9, 3.4458615807467833`*^9, 3.535372468224473*^9, 
   3.535376525828125*^9, 3.5353963419375*^9, 3.53539638346875*^9, 
   3.535396455453125*^9, 3.535455426281025*^9, 3.5354581244157047`*^9, 
   3.53545822928941*^9, 3.535458913351672*^9, 3.53552598821875*^9, 
   3.53552640175*^9, 3.5355264680625*^9, 3.535526587890625*^9, 
   3.535526708390625*^9, 3.535541111953125*^9, 3.568446776067931*^9, 
   3.568449495941834*^9, 3.568450526054047*^9, 3.568450581433584*^9, 
   3.568450685524993*^9, 3.568451032494059*^9, 3.5684510633170595`*^9, 
   3.568451204073059*^9, 3.5684548597577934`*^9, 3.5684568224340506`*^9, 
   3.568457453228836*^9, 3.56845884153795*^9, 3.5684589741562104`*^9, 
   3.56845905576137*^9, 3.568521331187482*^9, 3.568522189042415*^9, 
   3.5685223092444153`*^9, 3.5719993968295918`*^9, 3.5720003694103165`*^9, 
   3.572000499139637*^9, 3.57200055397128*^9, 3.5720038996446247`*^9, 
   3.572005061185133*^9, 3.5720086356275043`*^9, 3.5720092465105867`*^9, 
   3.572161169873272*^9, 3.572161459626244*^9, 3.57216167280756*^9, 
   3.572167676202877*^9, 3.5721679970279565`*^9, 3.5721737453567505`*^9, 
   3.5721741773589463`*^9, {3.5757769146576405`*^9, 3.575776937232448*^9}, {
   3.575777023597414*^9, 3.575777030903783*^9}, 3.5757998733878994`*^9, 
   3.577450626934743*^9, 3.5774506604020896`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"{", 
   RowBox[{"cdp2expr", ",", "cdp1expr"}], "}"}], " ", "=", " ", 
  RowBox[{"c", "+", 
   RowBox[{"2", " ", 
    RowBox[{"zc", ".", 
     RowBox[{"(", 
      RowBox[{"dE", "+", "dEk"}], ")"}]}]}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"cp1", "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{"dEp1", "+", 
       RowBox[{
        FractionBox["1", "2"], " ", "ka", " ", 
        RowBox[{"(", 
         RowBox[{"T0", "-", "Tav"}], ")"}]}]}], ")"}], " ", "ZcEP"}]}], ",", 
   RowBox[{"cp2", "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{"dEp2", "+", 
       RowBox[{
        FractionBox["1", "2"], " ", "ka", " ", 
        RowBox[{"(", 
         RowBox[{"T0", "-", "Tav"}], ")"}]}]}], ")"}], " ", "ZcEP"}]}]}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.4458594483073063`*^9, 3.4458600864438467`*^9, 3.4458602269898224`*^9, 
   3.4458613150453587`*^9, 3.4458615808874073`*^9, 3.5353724684274564`*^9, 
   3.535376529375*^9, 3.53539634203125*^9, 3.5353963835625*^9, 
   3.535396455546875*^9, 3.5354554263122745`*^9, 3.5354581244313293`*^9, 
   3.5354582293050346`*^9, 3.535458913367297*^9, 3.535525988328125*^9, 
   3.53552640184375*^9, 3.535526468140625*^9, 3.535526588*^9, 
   3.535526708484375*^9, 3.535541112046875*^9, 3.568446776272931*^9, 
   3.5684494959898434`*^9, 3.568450526091051*^9, 3.5684505814645877`*^9, 
   3.568450685590999*^9, 3.568451032542059*^9, 3.5684510633860593`*^9, 
   3.568451204105059*^9, 3.568454859794797*^9, 3.568456822500057*^9, 
   3.5684574532908363`*^9, 3.568458841591955*^9, 3.568458974202215*^9, 
   3.5684590557963734`*^9, 3.5685213312414875`*^9, 3.568522189114415*^9, 
   3.568522309278415*^9, 3.571999396860795*^9, 3.572000369441517*^9, 
   3.5720004991708374`*^9, 3.5720005540024805`*^9, 3.572003899675825*^9, 
   3.5720050612007327`*^9, 3.572008635657507*^9, 3.5720092465385895`*^9, 
   3.572161169898274*^9, 3.5721614597422557`*^9, 3.572161672826562*^9, 
   3.5721676762298794`*^9, 3.572167997055959*^9, 3.5721737453877535`*^9, 
   3.5721741773909492`*^9, {3.575776914673252*^9, 3.57577693724806*^9}, {
   3.575777023628638*^9, 3.5757770309193954`*^9}, 3.5757998735508995`*^9, 
   3.577450626972747*^9, 3.5774506604320927`*^9}]
}, Open  ]],

Cell[BoxData[{
 RowBox[{
  RowBox[{"qm1", "=", 
   RowBox[{"q1", " ", "rhofuel"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"dE", "=", 
   RowBox[{"q1", " ", "rhofuel", " ", "cfuel"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.5703061899370613`*^9, 3.5703062136854196`*^9}, {
   3.5703062444511795`*^9, 3.570306246772312*^9}, 3.570306431637886*^9, 
   3.570306553634864*^9, 3.5703073189876394`*^9, {3.5703075923892775`*^9, 
   3.5703076087802143`*^9}, {3.5703076633683367`*^9, 3.570307673589922*^9}, {
   3.570473512144456*^9, 3.5704735128824987`*^9}, {3.571232833404647*^9, 
   3.5712328412480955`*^9}, {3.5721971758356447`*^9, 3.5721971940346856`*^9}}],

Cell[CellGroupData[{

Cell["Filtering of characteristics", "Subsubsection"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"cp1expr", "=", 
   RowBox[{
    RowBox[{"alpha", " ", "double"}], " ", "+", 
    RowBox[{
     RowBox[{"(", 
      RowBox[{"1", "-", "alpha"}], ")"}], " ", "cpl1r"}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"cp2expr", "=", 
   RowBox[{
    RowBox[{"alpha", " ", "cp2rf"}], " ", "+", 
    RowBox[{
     RowBox[{"(", 
      RowBox[{"1", "-", "alpha"}], ")"}], " ", "cpl2r"}]}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.516294111390625*^9, 3.5162941551875*^9}, 
   3.5353765348125*^9, 3.53539053815625*^9}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"cp1expr", " ", "=", " ", 
   RowBox[{"cdp1", "+", 
    RowBox[{"ZcEP", 
     FractionBox["ka", "2"], " ", 
     RowBox[{"(", 
      RowBox[{"T0", "-", "Tav"}], ")"}]}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"cp2expr", " ", "=", " ", 
   RowBox[{"cdp2", "+", 
    RowBox[{"ZcEP", 
     FractionBox[
      RowBox[{"ka", " "}], "2"], 
     RowBox[{"(", 
      RowBox[{"T0", "-", "Tav"}], ")"}]}]}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.5353703993044605`*^9, 3.5353704089374967`*^9}}]
}, Open  ]]
}, Open  ]],

Cell[BoxData[
 RowBox[{"fak", "=."}]], "Input",
 CellChangeTimes->{{3.5354585055339465`*^9, 3.5354585107681875`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"initialExpressions", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"fak", "==", 
      RowBox[{"1", "/", 
       RowBox[{"(", 
        RowBox[{"1", "-", "alpha"}], ")"}]}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"Tav", "==", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"Tp1", "+", "Tp2"}], ")"}], "/", "2"}]}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"pav", "==", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"pp1", "+", "pp2"}], ")"}], "/", "2"}]}], " ", ",", 
     "\[IndentingNewLine]", 
     RowBox[{"mass", "==", 
      FractionBox[
       RowBox[{"pav", " ", "V"}], 
       RowBox[{"Tav", " ", "R"}]]}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.535525933015625*^9, 3.535525934390625*^9}, {
  3.572018358400789*^9, 3.572018368048341*^9}, {3.5721679651057644`*^9, 
  3.5721679812263765`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"initialValues", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"Tav", "==", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"Tp1", "+", "Tp2"}], ")"}], "/", "2"}]}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"pav", "==", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"pp1", "+", "pp2"}], ")"}], "/", "2"}]}], " ", ",", 
     "\[IndentingNewLine]", 
     RowBox[{"mass", "==", 
      FractionBox[
       RowBox[{"pav", " ", "V"}], 
       RowBox[{"Tav", " ", "R"}]]}], ",", "\[IndentingNewLine]", 
     RowBox[{"Zcp1", "==", "Zc1e"}], ",", "\[IndentingNewLine]", 
     RowBox[{"ZcEP2", "==", "ZcEPexpr"}], ",", "\[IndentingNewLine]", 
     RowBox[{"cp1", "==", " ", "pp1"}], ",", "\[IndentingNewLine]", 
     RowBox[{"cp2", "==", "pp2"}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.53539636325*^9, 3.535396368984375*^9}, {
  3.5354583473183937`*^9, 3.535458378895912*^9}, {3.5684506573191724`*^9, 
  3.5684506618966303`*^9}, {3.5720183767608385`*^9, 3.572018410382762*^9}, {
  3.5721675541256704`*^9, 3.572167557997058*^9}, {3.5721676201532726`*^9, 
  3.572167644859743*^9}, {3.572197247156724*^9, 3.572197292805335*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"h", "=", "mTimestep"}], ";"}]], "Input",
 CellChangeTimes->{{3.5684549457303896`*^9, 3.5684549483496513`*^9}}],

Cell[BoxData[""], "Input",
 CellChangeTimes->{{3.5684512798380594`*^9, 3.568451286134059*^9}, 
   3.5684513539022284`*^9}],

Cell[BoxData[
 RowBox[{" ", 
  RowBox[{
   RowBox[{"localExpressions", " ", "=", 
    RowBox[{"{", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"pav", "==", 
       RowBox[{
        RowBox[{
         RowBox[{"onPositive", " ", "[", 
          RowBox[{"pp1", "+", "pp2", "-", "pmin"}], "]"}], 
         FractionBox[
          RowBox[{"(", 
           RowBox[{"pp1", "+", "pp2", "-", "pmin"}], ")"}], "2"]}], " ", "+", 
        FractionBox["pmin", "2"]}]}], ",", "\[IndentingNewLine]", 
      RowBox[{"Tav", "==", "Texpr"}], ",", "\[IndentingNewLine]", 
      RowBox[{"ZcEP", "==", "ZcEPexpr"}], ",", "\[IndentingNewLine]", 
      RowBox[{"cdp1", "==", "cdp1expr"}], ",", "\[IndentingNewLine]", 
      RowBox[{"cdp2", "==", "cdp2expr"}]}], "\[IndentingNewLine]", "}"}]}], 
   ";"}]}]], "Input",
 CellChangeTimes->{{3.535389245*^9, 3.535389310125*^9}, {3.535458381317741*^9,
    3.5354583919581614`*^9}, {3.568450649202361*^9, 3.5684506543918796`*^9}, 
   3.568451420013839*^9, {3.5720184181732073`*^9, 3.5720184486629515`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"expressions", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"Tp1", "==", "Tav"}], ",", "\[IndentingNewLine]", 
     RowBox[{"Tp2", "==", "Tav"}], ",", "\[IndentingNewLine]", 
     RowBox[{"cp1", "==", "cp1expr"}], ",", "\[IndentingNewLine]", 
     RowBox[{"cp2", "==", "cp2expr"}], ",", "\[IndentingNewLine]", 
     RowBox[{"Zcp1", "==", "ZcEP"}], ",", "\[IndentingNewLine]", 
     RowBox[{"Zcp2", "==", "ZcEP"}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.535396355265625*^9, 3.5353963564375*^9}, {
   3.535458354990122*^9, 3.5354583554901123`*^9}, {3.5354583952080994`*^9, 
   3.535458407817232*^9}, 3.5354584912374372`*^9, {3.568450434646907*^9, 
   3.56845044037348*^9}, {3.5720184529101944`*^9, 3.5720184746224365`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partd"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part specification \[NoBreak]\\!\\(delayedPart \
\[LeftDoubleBracket] \\(\\(1, 1\\)\\) \[RightDoubleBracket]\\)\[NoBreak] is \
longer than depth of object. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partd\\\", ButtonNote -> \
\\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.57577691481376*^9, 3.575776937513462*^9}, {
   3.5757770237847567`*^9, 3.575777031075514*^9}, 3.5757998736979*^9, 
   3.577450627185768*^9, 3.577450660970146*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partw"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part \[NoBreak]\\!\\(6\\)\[NoBreak] of \
\[NoBreak]\\!\\(HydraulicCport[\\(\\(p1, 100000.`, \\\"fluid port \
1\\\"\\)\\)]\\)\[NoBreak] does not exist. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partw\\\", ButtonNote -> \
\\\"Part::partw\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.57577691481376*^9, 3.575776937513462*^9}, {
   3.5757770237847567`*^9, 3.575777031075514*^9}, 3.5757998736979*^9, 
   3.577450627185768*^9, 3.5774506609731464`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partw"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part \[NoBreak]\\!\\(6\\)\[NoBreak] of \
\[NoBreak]\\!\\(HydraulicCport[\\(\\(p1, 100000.`, \\\"fluid port \
1\\\"\\)\\)]\\)\[NoBreak] does not exist. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partw\\\", ButtonNote -> \
\\\"Part::partw\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.57577691481376*^9, 3.575776937513462*^9}, {
   3.5757770237847567`*^9, 3.575777031075514*^9}, 3.5757998736979*^9, 
   3.577450627185768*^9, 3.577450660974147*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Part", "::", "partw"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Part \[NoBreak]\\!\\(6\\)\[NoBreak] of \
\[NoBreak]\\!\\(HydraulicCport[\\(\\(p1, 100000.`, \\\"fluid port \
1\\\"\\)\\)]\\)\[NoBreak] does not exist. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/partw\\\", ButtonNote -> \
\\\"Part::partw\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.57577691481376*^9, 3.575776937513462*^9}, {
   3.5757770237847567`*^9, 3.575777031075514*^9}, 3.5757998736979*^9, 
   3.577450627185768*^9, 3.577450660975147*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Part :: \
partw\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.57577691481376*^9, 3.575776937513462*^9}, {
   3.5757770237847567`*^9, 3.575777031075514*^9}, 3.5757998736979*^9, 
   3.577450627185768*^9, 3.577450660977147*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"PneumaticGasGenerator.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"PneumaticGasGenerator.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\(\[LeftSkeleton] 1 \
\[RightSkeleton]\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \
\\(\\({\\(\\(\\\"x\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \
0.3333333333333333`\\)\\), \\(\\(\\\"a\\\" \[Rule] \\\"0\\\"\\)\\), \
\\(\\(\\\"name\\\" \[Rule] \\\"Pp1\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\
\\), \\(\\(\\(\\(\[LeftSkeleton] 10 \[RightSkeleton]\\)\\)[\\(\\(\
\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)]\\)\\), \\(\\(\[LeftSkeleton] 1 \
\[RightSkeleton]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"hopsanobjectappearance\\\", \
\\(\\({\\\"version\\\" \[Rule] \\\"0.1\\\"}\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"modelobject\\\", \\(\\(\[LeftSkeleton] 1 \
\[RightSkeleton]\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \
\\(\\({\\(\\(\\\"isopath\\\" \[Rule] \\\"PneumaticGasGenerator.svg\\\"\\)\\), \
\\(\\(\\\"iconrotation\\\" \[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \
\[Rule] \\\"PneumaticGasGenerator.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\
\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \\(\\({\
\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\
\\)\\)\\)]\\)\[NoBreak] is not a list of contents. The third item in an \
XMLElement must be a list of contents, even if it is an empty list. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.57577691481376*^9, 3.575776937513462*^9}, {
   3.5757770237847567`*^9, 3.575777031075514*^9}, 3.5757998736979*^9, 
   3.577450627185768*^9, 3.5774506610021496`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.57577691481376*^9, 3.575776937513462*^9}, {
   3.5757770237847567`*^9, 3.575777031075514*^9}, 3.5757998736979*^9, 
   3.577450627185768*^9, 3.5774506610041494`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.3333333333333333`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"y\\\" \[Rule] 0.3333333333333333`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.57577691481376*^9, 3.575776937513462*^9}, {
   3.5757770237847567`*^9, 3.575777031075514*^9}, 3.5757998736979*^9, 
   3.577450627185768*^9, 3.57745066100515*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.57577691481376*^9, 3.575776937513462*^9}, {
   3.5757770237847567`*^9, 3.575777031075514*^9}, 3.5757998736979*^9, 
   3.577450627185768*^9, 3.5774506610071497`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.6666666666666666`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"y\\\" \[Rule] 0.6666666666666666`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.57577691481376*^9, 3.575776937513462*^9}, {
   3.5757770237847567`*^9, 3.575777031075514*^9}, 3.5757998736979*^9, 
   3.577450627185768*^9, 3.57745066100815*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.57577691481376*^9, 3.575776937513462*^9}, {
   3.5757770237847567`*^9, 3.575777031075514*^9}, 3.5757998736979*^9, 
   3.577450627185768*^9, 3.5774506610091505`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.572161170085293*^9, 3.57216145988827*^9, 3.572161672938573*^9, 
   3.572167676400897*^9, 3.5721679972539787`*^9, 3.5721737455397687`*^9, 
   3.572174177554966*^9, {3.57577691481376*^9, 3.575776937513462*^9}, {
   3.5757770237847567`*^9, 3.575777031075514*^9}, 3.5757998736979*^9, 
   3.577450627185768*^9, 3.5774506610101504`*^9}],

Cell[BoxData["\<\"PneumaticGasGenerator.xml\"\>"], "Output",
 CellChangeTimes->{
  3.5353964561875*^9, 3.53545542745287*^9, 3.535458124634453*^9, 
   3.535458229586279*^9, 3.535458913523546*^9, 3.535525989125*^9, 
   3.53552640253125*^9, 3.535526469359375*^9, 3.535526588671875*^9, 
   3.53552670925*^9, 3.53554111803125*^9, 3.568446777936931*^9, 
   3.5684494964409337`*^9, 3.568450526332075*^9, 3.5684505823786793`*^9, 
   3.568450685939034*^9, 3.568451032821059*^9, 3.568451063707059*^9, 
   3.5684512043520594`*^9, 3.5684548600758247`*^9, 3.568456822950102*^9, 
   3.568457453927836*^9, 3.568458842199016*^9, 3.5684589747732725`*^9, 
   3.568459056106405*^9, 3.568521331529516*^9, 3.568522189739415*^9, 
   3.568522309600415*^9, 3.571999397063613*^9, 3.5720003696599183`*^9, 
   3.572000499389239*^9, 3.5720005546016865`*^9, 3.5720038999878273`*^9, 
   3.572005061512735*^9, 3.5720086359815397`*^9, 3.572009247226658*^9, 
   3.572161170489333*^9, 3.5721614599152727`*^9, 3.5721616729735765`*^9, 
   3.5721676764319*^9, 3.5721679972839823`*^9, 3.572173745572772*^9, 
   3.572174177584969*^9, {3.575776914844983*^9, 3.5757769375446863`*^9}, {
   3.575777023815981*^9, 3.5757770311223497`*^9}, 3.5757998737578993`*^9, 
   3.577450627197769*^9, 3.5774506610121503`*^9}]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell["Orifice", "Section",
 CellChangeTimes->{{3.5353721095590158`*^9, 3.53537211830196*^9}, 
   3.5353722343957663`*^9}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Pneumatic\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<Orifice\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Pneumatic orifice\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentQ\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFilenames", "[", 
   RowBox[{"defaultPath", ",", "domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.513785360140625*^9, 3.513785397734375*^9}, 
   3.5137854683125*^9, 3.5153945210188417`*^9, {3.51608651940625*^9, 
   3.516086528875*^9}, {3.516356859703125*^9, 3.516356873*^9}, {
   3.5353705928437004`*^9, 3.5353705930310946`*^9}, {3.535528004859375*^9, 
   3.535528013828125*^9}, 3.5757768090335207`*^9}],

Cell[BoxData[
 RowBox[{"eps", "=."}]], "Input",
 CellChangeTimes->{{3.575777009031903*^9, 3.5757770093129168`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "Cd", ",", "0.65", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Discharge coefficient\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "R", ",", "287.", ",", "double", ",", "\"\<J/Kg K\>\"", ",", 
       "\"\<Gas constant\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "cv", ",", "718", ",", "double", ",", "\"\<J/Kg K\>\"", ",", 
       "\"\<heatcoeff\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "eps", ",", "0.02", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Linearisation coeff\>\""}], "}"}]}], "\[IndentingNewLine]", 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535370565329912*^9, 3.5353705653455253`*^9}, {
   3.535370598980867*^9, 3.535370607569777*^9}, {3.535370682449456*^9, 
   3.535370772725971*^9}, 3.5355279035625*^9, {3.572017994427971*^9, 
   3.5720180086697855`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputVariables", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{"A0", ",", 
      RowBox[{"1.", "*", 
       RowBox[{"10", "^", 
        RowBox[{"-", "6"}]}]}], ",", "double", ",", "\"\<m2\>\"", ",", 
      "\"\<Area\>\""}], "}"}], "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535527741234375*^9, 3.535527744390625*^9}, {
  3.535527776078125*^9, 3.5355278698125*^9}, {3.5720180179783173`*^9, 
  3.5720180202844496`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"portConnections", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"PneumaticQport", "[", 
      RowBox[{"p1", ",", "100000.", ",", "\"\<fluid port 1\>\"", ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0.5", ",", "270"}], "}"}]}], "]"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"PneumaticQport", "[", 
      RowBox[{"p2", ",", "100000.", ",", "\"\<fluid port 2\>\"", ",", 
       RowBox[{"{", 
        RowBox[{"1", ",", "0.5", ",", "90"}], "}"}]}], "]"}]}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535370789690829*^9, 3.5353707897064214`*^9}, 
   3.53552777309375*^9, {3.535542211390625*^9, 3.535542214078125*^9}, {
   3.535542265921875*^9, 3.535542311625*^9}, {3.5720179781800413`*^9, 
   3.5720179866305246`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"nodeConnections", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"PneumaticQnode", "[", 
      RowBox[{"p1", ",", "100000.", ",", "\"\<fluid port 1\>\""}], "]"}], ",",
      "\[IndentingNewLine]", 
     RowBox[{"PneumaticQnode", "[", 
      RowBox[{"p2", ",", "100000.", ",", "\"\<fluid port 2\>\""}], "]"}]}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535370789690829*^9, 3.5353707897064214`*^9}, 
   3.53552777309375*^9, {3.535542211390625*^9, 3.535542214078125*^9}, {
   3.535542265921875*^9, 3.535542311625*^9}, {3.5684508318796263`*^9, 
   3.5684508487293115`*^9}, {3.5684511750240593`*^9, 
   3.5684511760840592`*^9}, {3.5720179665203743`*^9, 3.572017974399825*^9}}],

Cell["\<\
qmp1 = qp1;
qmp2 = qp2;\
\>", "Text",
 CellChangeTimes->{{3.5685212396426315`*^9, 3.56852125718814*^9}, 
   3.5720004773150973`*^9}],

Cell[CellGroupData[{

Cell["The system of equations", "Subsection",
 Evaluatable->False,
 PageBreakAbove->False],

Cell["The flow at inlet and outlet are equal but with oposit sign.", "Text"],

Cell[BoxData[
 RowBox[{"qmp2", "=."}]], "Input",
 CellChangeTimes->{{3.572001186606417*^9, 3.5720011923160543`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"qmp1e", " ", "=", " ", 
   RowBox[{"-", "qmp2"}]}], ";"}]], "Input",
 CellChangeTimes->{3.516357397796875*^9, 3.51635748325*^9, 
  3.516358905203125*^9, 3.57201794738328*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Ng1", "=", "1"}]], "Input",
 CellChangeTimes->{3.51635891059375*^9}],

Cell[BoxData["1"], "Output",
 CellChangeTimes->{
  3.5721616730615854`*^9, 3.572167676542911*^9, {3.575776914938655*^9, 
   3.5757769376539693`*^9}, {3.5757770239564877`*^9, 3.575777031247245*^9}, 
   3.5757998738749*^9, 3.577450627842834*^9, 3.577450661156165*^9}]
}, Open  ]]
}, Open  ]],

Cell[BoxData[
 RowBox[{"qma", ":=", 
  FractionBox[
   RowBox[{"pp1", " ", "Cd", " ", "A0", " ", "Kg", " ", "Ng"}], 
   SqrtBox["Tp1"]]}]], "Input",
 CellChangeTimes->{
  3.5684570790167065`*^9, {3.5684589217979755`*^9, 3.56845892234403*^9}}],

Cell[BoxData[
 RowBox[{"qmb", ":=", 
  FractionBox[
   RowBox[{"pp2", " ", "Cd", " ", "A0", " ", "Kg", " ", "Ng"}], 
   SqrtBox["Tp2"]]}]], "Input",
 CellChangeTimes->{
  3.568457050011806*^9, {3.568458925098305*^9, 3.5684589252603216`*^9}}],

Cell[BoxData[
 RowBox[{"Nga2", ":=", 
  RowBox[{"keps", " ", 
   RowBox[{"(", 
    RowBox[{"signedSquareL", "[", 
     RowBox[{
      FractionBox[
       RowBox[{
        SuperscriptBox[
         RowBox[{"(", 
          FractionBox["pp2", "pp1"], ")"}], 
         RowBox[{"2", "/", "kappa"}]], "-", 
        SuperscriptBox[
         RowBox[{"(", 
          FractionBox["pp2", "pp1"], ")"}], 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"kappa", "+", "1"}], ")"}], "/", "kappa"}]]}], "Ndenom"], 
      ",", "eps"}], "]"}], ")"}]}]}]], "Input",
 CellChangeTimes->{{3.516362438390625*^9, 3.51636243934375*^9}, {
   3.51636253609375*^9, 3.5163625365625*^9}, 3.568457441890836*^9}],

Cell[BoxData[
 RowBox[{"Ngb2", ":=", 
  RowBox[{"keps", 
   RowBox[{"(", 
    RowBox[{"signedSquareL", "[", 
     RowBox[{
      FractionBox[
       RowBox[{
        SuperscriptBox[
         RowBox[{"(", 
          FractionBox["pp1", "pp2"], ")"}], 
         RowBox[{"2", "/", "kappa"}]], "-", 
        SuperscriptBox[
         RowBox[{"(", 
          FractionBox["pp1", "pp2"], ")"}], 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"kappa", "+", "1"}], ")"}], "/", "kappa"}]]}], "Ndenom"], 
      ",", "eps"}], "]"}], ")"}]}]}]], "Input",
 CellChangeTimes->{{3.51636244103125*^9, 3.5163624414375*^9}, {
   3.5163625370625*^9, 3.51636253753125*^9}, 3.568457440183836*^9}],

Cell[BoxData[{
 RowBox[{"Ng", ":=", " ", 
  RowBox[{
   RowBox[{"onPositive", "[", 
    RowBox[{"pp1", "-", "pp2"}], "]"}], 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{"onPositive", "[", 
       RowBox[{
        FractionBox["pp2", "pp1"], "-", "crit"}], "]"}], "Nga2"}], " ", "+", 
     " ", 
     RowBox[{
      RowBox[{"onNegative", "[", 
       RowBox[{
        FractionBox["pp2", "pp1"], "-", "crit"}], "]"}], "Ng1"}]}], " ", 
    ")"}]}]}], "\n", 
 RowBox[{"\t", 
  RowBox[{
   RowBox[{
    RowBox[{"+", " ", 
     RowBox[{"onNegative", "[", 
      RowBox[{"pp1", "-", "pp2"}], "]"}]}], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"onPositive", "[", 
        RowBox[{
         FractionBox["pp1", "pp2"], "-", "crit"}], "]"}], "Ngb2"}], " ", "+", 
      " ", 
      RowBox[{
       RowBox[{"onNegative", "[", 
        RowBox[{
         FractionBox["pp1", "pp2"], "-", "crit"}], "]"}], "Ng1"}]}], " ", 
     ")"}]}], ";"}]}]}], "Input",
 CellChangeTimes->{{3.5163624423125*^9, 3.51636244390625*^9}, {
  3.51636253840625*^9, 3.516362539765625*^9}, {3.535528086984375*^9, 
  3.535528088671875*^9}, {3.5355281776875*^9, 3.535528179484375*^9}, {
  3.568456986935499*^9, 3.568457000885894*^9}, {3.568457185341836*^9, 
  3.568457191564836*^9}, {3.568458824569253*^9, 3.5684588327220683`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"dEp1q", " ", "=", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{"onPositive", "[", "qmp1e", "]"}], " ", "qmp1e", " ", "cv", " ",
       "Tp2"}], "+", 
     RowBox[{
      RowBox[{"onNegative", "[", "qmp1e", "]"}], "qmp1e", "  ", "Tp1", " ", 
      "cv"}]}], ")"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"dEp1ew", " ", "=", " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{"onPositive", "[", "qmp1e", "]"}], " ", "qmp1e", " ", "R", " ", 
      "Tp2"}], "+", 
     RowBox[{
      RowBox[{"onNegative", "[", "qmp1e", "]"}], "qmp1e", " ", "Tp1", "  ", 
      "R"}]}], ")"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"dEp1gh", "=", 
   RowBox[{"R", " ", 
    RowBox[{"onPositive", "[", "qmp1e", "]"}], " ", "qmp1e", " ", "Tp2", " ", 
    RowBox[{"(", 
     RowBox[{"1", "-", 
      FractionBox["pp1", "pp2"]}], ")"}]}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.516357484390625*^9, 3.51635748865625*^9}, {
   3.516358885234375*^9, 3.5163588934375*^9}, {3.516362223375*^9, 
   3.516362229328125*^9}, 3.51636244490625*^9, 3.51636254071875*^9, {
   3.53552808940625*^9, 3.535528090421875*^9}, {3.53552818034375*^9, 
   3.535528180765625*^9}, {3.568457016888494*^9, 3.5684570173715425`*^9}, {
   3.568457050943899*^9, 3.5684570521620207`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"dEp2q", " ", "=", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{"onPositive", "[", "qmp2", "]"}], " ", "qmp2", " ", "cv", " ", 
      "Tp1"}], "+", 
     RowBox[{
      RowBox[{"onNegative", "[", "qmp2", "]"}], "qmp2", "  ", "Tp2", " ", 
      "cv"}]}], ")"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"dEp2ew", " ", "=", " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{"onPositive", "[", "qmp2", "]"}], " ", "qmp2", " ", "R", " ", 
      "Tp1"}], "+", 
     RowBox[{
      RowBox[{"onNegative", "[", "qmp2", "]"}], "qmp2", " ", "Tp2", "  ", 
      "R"}]}], ")"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"dEp2gh", "=", 
   RowBox[{"R", " ", 
    RowBox[{"onPositive", "[", "qmp2", "]"}], " ", "qmp2", " ", "Tp1", " ", 
    RowBox[{"(", 
     RowBox[{"1", "-", 
      FractionBox["pp2", "pp1"]}], ")"}]}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.51635740025*^9, 3.5163574050625*^9}, {
   3.51636227890625*^9, 3.516362279890625*^9}, 3.516362445890625*^9, 
   3.516362541453125*^9, {3.53552809109375*^9, 3.5355280919375*^9}, {
   3.53552818153125*^9, 3.535528181921875*^9}, {3.5684570182966347`*^9, 
   3.5684570194077463`*^9}, {3.5684570528260875`*^9, 3.5684570532431293`*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell["Plotting flow as a function of pressure", "Subsection"],

Cell[CellGroupData[{

Cell["Parameters", "Subsubsection"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Fa1", "[", 
   RowBox[{"qmp2_", ",", "pp1_", ",", "pp2_"}], "]"}], ":=", 
  RowBox[{"qmp2", "-", 
   RowBox[{"(", " ", 
    RowBox[{
     RowBox[{
      RowBox[{"onPositive", "[", 
       RowBox[{"pp1", "-", "pp2"}], "]"}], " ", "qma"}], " ", "-", " ", 
     RowBox[{
      RowBox[{"onNegative", "[", 
       RowBox[{"pp1", "-", "pp2"}], "]"}], " ", "qmb"}]}], ")"}]}]}], "\n", 
 RowBox[{"\t"}]}], "Input",
 CellChangeTimes->{{3.516357417578125*^9, 3.516357418015625*^9}, {
   3.516362562890625*^9, 3.51636256375*^9}, {3.5163626186875*^9, 
   3.5163626221875*^9}, 3.5355280981875*^9, 3.53552816184375*^9}],

Cell[BoxData[
 RowBox[{"\n", "\t\t", 
  RowBox[{
   RowBox[{
    RowBox[{"keps", "=", 
     FractionBox["1", 
      RowBox[{
       RowBox[{"-", 
        SqrtBox["eps"]}], "+", 
       SqrtBox[
        RowBox[{"1", "+", "eps"}]]}]]}], ";"}], "\n", "\t\t", 
   RowBox[{
    RowBox[{"Kg", "=", 
     SqrtBox[
      RowBox[{
       FractionBox["kappa", "R"], 
       SuperscriptBox[
        RowBox[{"(", 
         FractionBox["2", 
          RowBox[{"kappa", "+", "1"}]], ")"}], 
        FractionBox[
         RowBox[{"kappa", "+", "1"}], 
         RowBox[{"kappa", "-", "1"}]]]}]]}], ";"}], "\n", "\t\t", 
   RowBox[{
    RowBox[{"Ndenom", "=", 
     RowBox[{
      FractionBox[
       RowBox[{"kappa", "-", "1"}], "2"], 
      SuperscriptBox[
       RowBox[{"(", 
        FractionBox["2", 
         RowBox[{"kappa", "+", "1"}]], ")"}], 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"kappa", "+", "1"}], ")"}], "/", 
        RowBox[{"(", 
         RowBox[{"kappa", "-", "1"}], ")"}]}]]}]}], ";"}], "\n", "\t\t", 
   RowBox[{
    RowBox[{"crit", "=", 
     SuperscriptBox[
      RowBox[{"(", 
       FractionBox["2", 
        RowBox[{"kappa", "+", "1"}]], ")"}], 
      RowBox[{"kappa", "/", 
       RowBox[{"(", 
        RowBox[{"kappa", "-", "1"}], ")"}]}]]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"signedSquareL", "[", 
     RowBox[{"x_", ",", "x0_"}], "]"}], ":=", 
    RowBox[{
     SqrtBox[
      RowBox[{"x", "+", "x0"}]], "-", 
     SqrtBox[
      RowBox[{"x0", "\n", "\t"}]]}]}]}]}]], "Input",
 CellChangeTimes->{3.568457436545836*^9, 3.572017924502971*^9}],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"onPositive", "[", "x_", "]"}], ":=", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "+", 
      RowBox[{"Sign", "[", "x", "]"}]}], ")"}], "/", "2"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"onNegative", "[", "x_", "]"}], ":=", 
   RowBox[{"1", "-", 
    RowBox[{
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"Sign", "[", "x", "]"}]}], ")"}], "/", "2"}]}]}], 
  ";"}], "\n"}], "Input",
 CellChangeTimes->{{3.535390652203125*^9, 3.535390653703125*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"eps", " ", "=", "0.1"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"kappa", " ", "=", " ", "1.4"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"R", " ", "=", " ", "287"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"cv", " ", "=", " ", "718"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Cd", " ", "=", " ", "0.65"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"A0", " ", "=", " ", "0.00001"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Tp1", "=", "200"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Tp2", "=", "200"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"pp1", " ", "=", 
   RowBox[{"10", "^", "5"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"p10", "=", "pp1"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"p20", "=", "pp2"}], ";"}], "\n"}], "Input",
 CellChangeTimes->{{3.516362467921875*^9, 3.516362469109375*^9}, 
   3.51636256475*^9, 3.5684570245952644`*^9, 3.568457056782483*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Fa1", "[", 
  RowBox[{"qmp2", ",", "pp1", ",", "pp2"}], "]"}]], "Input",
 CellChangeTimes->{3.516357419*^9, 3.5163624719375*^9, 3.516362572265625*^9}],

Cell[BoxData[
 RowBox[{"qmp2", "+", 
  RowBox[{"9.288545107381848`*^-9", " ", "pp2", " ", 
   RowBox[{"(", 
    RowBox[{"1", "+", 
     RowBox[{
      FractionBox["1", "2"], " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "1"}], "-", 
        RowBox[{"Sign", "[", 
         RowBox[{"100000", "-", "pp2"}], "]"}]}], ")"}]}]}], ")"}], " ", 
   RowBox[{"(", 
    RowBox[{"1", "+", 
     RowBox[{"Sign", "[", 
      RowBox[{"100000", "-", "pp2"}], "]"}]}], ")"}], " ", 
   RowBox[{"(", 
    RowBox[{"1", "+", 
     RowBox[{
      FractionBox["1", "2"], " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "1"}], "-", 
        RowBox[{"Sign", "[", 
         RowBox[{
          RowBox[{"-", "0.5282817877171742`"}], "+", 
          FractionBox["pp2", "100000"]}], "]"}]}], ")"}]}], "+", 
     RowBox[{"0.6825183070934947`", " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "0.31622776601683794`"}], "+", 
        SqrtBox[
         RowBox[{"0.1`", "\[VeryThinSpace]", "+", 
          RowBox[{"14.929920000000003`", " ", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"7.196856730011519`*^-8", " ", 
              SuperscriptBox["pp2", "1.4285714285714286`"]}], "-", 
             RowBox[{"2.682695795279729`*^-9", " ", 
              SuperscriptBox["pp2", "1.7142857142857142`"]}]}], ")"}]}]}]]}], 
       ")"}], " ", 
      RowBox[{"(", 
       RowBox[{"1", "+", 
        RowBox[{"Sign", "[", 
         RowBox[{
          RowBox[{"-", "0.5282817877171742`"}], "+", 
          FractionBox["pp2", "100000"]}], "]"}]}], ")"}]}]}], ")"}]}], "-", 
  RowBox[{"0.0004644272553690924`", " ", 
   SuperscriptBox[
    RowBox[{"(", 
     RowBox[{"1", "+", 
      RowBox[{"Sign", "[", 
       RowBox[{"100000", "-", "pp2"}], "]"}]}], ")"}], "2"], " ", 
   RowBox[{"(", 
    RowBox[{"1", "+", 
     RowBox[{
      FractionBox["1", "2"], " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "1"}], "-", 
        RowBox[{"Sign", "[", 
         RowBox[{
          RowBox[{"-", "0.5282817877171742`"}], "+", 
          FractionBox["pp2", "100000"]}], "]"}]}], ")"}]}], "+", 
     RowBox[{"0.6825183070934947`", " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "0.31622776601683794`"}], "+", 
        SqrtBox[
         RowBox[{"0.1`", "\[VeryThinSpace]", "+", 
          RowBox[{"14.929920000000003`", " ", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"7.196856730011519`*^-8", " ", 
              SuperscriptBox["pp2", "1.4285714285714286`"]}], "-", 
             RowBox[{"2.682695795279729`*^-9", " ", 
              SuperscriptBox["pp2", "1.7142857142857142`"]}]}], ")"}]}]}]]}], 
       ")"}], " ", 
      RowBox[{"(", 
       RowBox[{"1", "+", 
        RowBox[{"Sign", "[", 
         RowBox[{
          RowBox[{"-", "0.5282817877171742`"}], "+", 
          FractionBox["pp2", "100000"]}], "]"}]}], ")"}]}]}], 
    ")"}]}]}]], "Output",
 CellChangeTimes->{
  3.5163626325*^9, 3.5353724912084284`*^9, 3.535396350859375*^9, 
   3.535527562890625*^9, 3.535527622890625*^9, {3.535527883640625*^9, 
   3.53552791325*^9}, 3.53552802234375*^9, 3.535528727375*^9, 
   3.535541122125*^9, 3.5684467822639313`*^9, 3.5684494970640583`*^9, 
   3.5684505271101527`*^9, 3.5684505832137623`*^9, 3.568450686870127*^9, 
   3.568451033619059*^9, 3.5684510646760592`*^9, 3.5684512050510592`*^9, 
   3.568454860914909*^9, 3.568456824687276*^9, 3.5684569368534913`*^9, 
   3.568457129134718*^9, 3.5684574549888363`*^9, 3.5684588431631126`*^9, 
   3.5684589758353786`*^9, 3.56845905695949*^9, 3.5684626830810986`*^9, 
   3.5685213325646195`*^9, 3.568522190641415*^9, 3.5685223106884155`*^9, 
   3.568524357697646*^9, 3.568524498080646*^9, 3.5719993977032704`*^9, 
   3.5720003702683225`*^9, 3.572000499982043*^9, 3.5720005553663034`*^9, 
   3.5720007098237915`*^9, 3.5720010883805017`*^9, 3.57200112397993*^9, 
   3.5720012031113234`*^9, 3.5720039004714303`*^9, 3.5720050620431385`*^9, 
   3.572008636876629*^9, 3.5720092478697224`*^9, 3.5721616732956085`*^9, 
   3.572167676664923*^9, {3.5757769150479383`*^9, 3.5757769377944765`*^9}, {
   3.575777024237502*^9, 3.5757770313565283`*^9}, 3.5757998740048995`*^9, 
   3.577450628030853*^9, 3.5774506613161807`*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"AFa1", "[", 
   RowBox[{"pp1_", ",", "pp2_"}], "]"}], ":=", " ", 
  RowBox[{"qmp2", "/.", 
   RowBox[{"FindRoot", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"Fa1", "[", 
       RowBox[{"qmp2", ",", "pp1", ",", "pp2"}], "]"}], "==", "0"}], ",", 
     RowBox[{"{", 
      RowBox[{"qmp2", ",", "2"}], "}"}]}], "]"}]}]}]], "Input",
 CellChangeTimes->{{3.5163574201875*^9, 3.5163574225*^9}, {
  3.516362472953125*^9, 3.51636247359375*^9}, {3.51636258134375*^9, 
  3.516362582609375*^9}}],

Cell[BoxData[
 RowBox[{"pp2", "=."}]], "Input",
 CellChangeTimes->{3.516362583828125*^9}],

Cell[CellGroupData[{

Cell[BoxData["crit"], "Input"],

Cell[BoxData["0.5282817877171742`"], "Output",
 CellChangeTimes->{{3.516357542265625*^9, 3.5163575638125*^9}, {
   3.516357770296875*^9, 3.516357785546875*^9}, 3.516357818375*^9, 
   3.516358480453125*^9, 3.516358573265625*^9, 3.516359046796875*^9, 
   3.516362337546875*^9, 3.51636263253125*^9, 3.535372491317727*^9, 
   3.5353963510625*^9, 3.535527563046875*^9, 3.53552762303125*^9, {
   3.535527883734375*^9, 3.535527913375*^9}, 3.5355280225*^9, 
   3.535528728234375*^9, 3.53554112290625*^9, 3.5684467823279314`*^9, 
   3.5684494971470747`*^9, 3.5684505271661587`*^9, 3.5684505832937703`*^9, 
   3.5684506869531355`*^9, 3.568451033700059*^9, 3.5684510651350594`*^9, 
   3.568451205099059*^9, 3.5684548609849157`*^9, 3.568456824809288*^9, 
   3.568456937180524*^9, 3.5684571294767513`*^9, 3.5684574550618362`*^9, 
   3.56845884323912*^9, 3.5684589759173865`*^9, 3.5684590570254965`*^9, 
   3.568462683144105*^9, 3.5685213330136642`*^9, 3.5685221907244153`*^9, 
   3.568522310762415*^9, 3.5685243580186462`*^9, 3.5685244985116463`*^9, 
   3.5719993977500744`*^9, 3.5720003703151226`*^9, 3.572000500028843*^9, 
   3.5720005554287033`*^9, 3.5720007098705916`*^9, 3.572001088427302*^9, 
   3.57200112402673*^9, 3.5720012031581235`*^9, 3.5720039005182304`*^9, 
   3.5720050620899386`*^9, 3.5720086369426355`*^9, 3.5720092479157267`*^9, 
   3.5721616733416133`*^9, 3.572167676705927*^9, {3.5757769150791616`*^9, 
   3.575776937841312*^9}, {3.5757770242999496`*^9, 3.575777031403364*^9}, 
   3.5757998740488997`*^9, 3.577450628083858*^9, 3.577450661368186*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["Ng"], "Input"],

Cell[BoxData[
 RowBox[{
  FractionBox["1", "2"], " ", 
  RowBox[{"(", 
   RowBox[{"1", "+", 
    RowBox[{"Sign", "[", 
     RowBox[{"100000", "-", "pp2"}], "]"}]}], ")"}], " ", 
  RowBox[{"(", 
   RowBox[{"1", "+", 
    RowBox[{
     FractionBox["1", "2"], " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"-", "1"}], "-", 
       RowBox[{"Sign", "[", 
        RowBox[{
         RowBox[{"-", "0.5282817877171742`"}], "+", 
         FractionBox["pp2", "100000"]}], "]"}]}], ")"}]}], "+", 
    RowBox[{"0.6825183070934947`", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"-", "0.31622776601683794`"}], "+", 
       SqrtBox[
        RowBox[{"0.1`", "\[VeryThinSpace]", "+", 
         RowBox[{"14.929920000000003`", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"7.196856730011519`*^-8", " ", 
             SuperscriptBox["pp2", "1.4285714285714286`"]}], "-", 
            RowBox[{"2.682695795279729`*^-9", " ", 
             SuperscriptBox["pp2", "1.7142857142857142`"]}]}], ")"}]}]}]]}], 
      ")"}], " ", 
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"Sign", "[", 
        RowBox[{
         RowBox[{"-", "0.5282817877171742`"}], "+", 
         FractionBox["pp2", "100000"]}], "]"}]}], ")"}]}]}], 
   ")"}]}]], "Output",
 CellChangeTimes->{
  3.5163626325625*^9, 3.5353724913645697`*^9, 3.53539635115625*^9, 
   3.535527563171875*^9, 3.53552762309375*^9, {3.535527883796875*^9, 
   3.535527913453125*^9}, 3.53552802259375*^9, 3.53552872834375*^9, 
   3.535541122984375*^9, 3.568446782383931*^9, 3.568449497346115*^9, 
   3.568450527210163*^9, 3.5684505833447757`*^9, 3.568450687012141*^9, 
   3.5684510337270594`*^9, 3.568451065205059*^9, 3.5684512051290593`*^9, 
   3.5684548610319204`*^9, 3.5684568248742943`*^9, 3.568456937230529*^9, 
   3.5684571295277567`*^9, 3.568457455101836*^9, 3.568458843278124*^9, 
   3.568458975970392*^9, 3.5684590570585003`*^9, 3.5684626831841087`*^9, 
   3.568521333043668*^9, 3.5685221907514153`*^9, 3.568522310821415*^9, 
   3.568524358075646*^9, 3.568524498575646*^9, 3.571999397781277*^9, 
   3.572000370346323*^9, 3.5720005000600433`*^9, 3.5720005554599037`*^9, 
   3.5720007098861914`*^9, 3.572001088458502*^9, 3.57200112405793*^9, 
   3.5720012031893234`*^9, 3.572003900549431*^9, 3.572005062105539*^9, 
   3.5720086369826393`*^9, 3.5720092479437294`*^9, 3.5721616733626156`*^9, 
   3.57216767672993*^9, {3.575776915266505*^9, 3.575776937856924*^9}, {
   3.5757770243155613`*^9, 3.575777031418976*^9}, 3.5757998740779*^9, 
   3.5774506281168613`*^9, 3.577450661399189*^9}]
}, Open  ]],

Cell[BoxData[{
 RowBox[{
  RowBox[{"p10", "=", "pp1"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"p20", "=", "pp2"}], ";"}]}], "Input",
 CellChangeTimes->{3.5163624750625*^9, 3.516362590578125*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ParametricPlot", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"pp2", "/", "pp1"}], ",", "Ng"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"pp2", ",", "1", ",", "200000"}], "}"}]}], "]"}]], "Input",
 CellChangeTimes->{
  3.51636247621875*^9, {3.516362591890625*^9, 3.516362592875*^9}}],

Cell[BoxData[
 GraphicsBox[{{{}, {}, 
    {Hue[0.67, 0.6, 0.6], LineBox[CompressedData["
1:eJxTTMoPSmViYGCQBGIQ/THjccfWH0/sGMDgg/2c7Rs9FWSm2MP4qZqR+y5I
LYHzD637/2LCpy1wftbkGocncvvh/F9lM3YI9ByB82u5ZDwffzkJ5/s0lzh4
M56H87UNf0//bHMJztf8x8lW8+YKnH/Wtln9fO51OL/fQNDVRvUWnP9jKqdY
ybo7cP6NG/6xz7Tuw/mR09TyOq8j+G9W1tmLOT2A870jtzDb5yL4qzleHU+f
geBHP2DR+rMWwefZId8z4TCC/1hZd2/UOQR/T7/VO5WbCP5y14NsXfcQ/Cm/
3eXfP8bNBwD7SoWC
      "]], LineBox[CompressedData["
1:eJwV1nk4ltkbB3BaBmm0kKWshSRjaRmmpr5JiwklrURKSbyoaDDKT01vWt6S
mahQrxZlKi1aaUJkC9lDsj3vvj5HpCxhnt8f57qvz5/nvq9zvrdZwAGvwHEq
KiqZzPl/DQ3a4plHd2NMOnZxeIxgWe/K0aK+bhxxHRjpZawVZ59dOdAN62NN
lJBxl5qxT+NIN/JpfzQxzvlbU719HIWS0r26BYz/NBp8LlCjEDEpe98txpv/
Ee1RTqawOGXEjs3YYmHTtK/TKKycZhqxi/HX/KLCUV0KS7+32jgxLnd9FKZm
SKHitsJfk3Fq49VZU80oONkZa7aNEoTsPPtO35JC31k720zGv0qjo83mU3A+
SlUEM/7xcKCFtT2F3Et9bdaMO0e9GhcspiBcZr5XPEJwXMfWbhUobH3f1ObF
2CtjVof7Kgoep6vKVRnPsdbgbPmNQtDhGuvs7wSlEIj2baLwaefHjX3DBJcr
65MPbGfuc239jCTGwVsKV8b4UbjDuedhxViTlcY9E0TBN58/y22IoL3/lPvf
oRTOc81zPgwSPDj2+1DaIQppIdqvdjDeeMlza/YRCi8fPLPwGSBIKfpBq/YC
hTc/tfiYfiUIcv/yb0syhdb5u9kJ/QROLVRwdyqFu0uUxpIvBG2K16Wfb1EY
9ebevtZHYKofGaeTS6HBcQ6p7yH4fHPXfKN8Cv1S9iVtxsU/rf9oUUzBYS59
35MQBLrMW+xYTaF3z0qTfCXBvfAuhXc3M7/MVEN/GcHRweq0ACEFkbnE6qiU
wIP9ypUlozBU1ZeRLCEgqSmZR79Q+Op3svqliGBRqZtvhjoPkXIj7XIeQeGs
3CqBPQ+coY20ehsz79prD7x/5uH2XzWjxa0EtuwTF2qW8oA1TbeiWwiuKdZv
yl3Dg0XGx3/qmghi84VtHF8eHn4b5jjXEjj6a8sWnOZhbqf2TOO3BOHag1VZ
53loNQoxPV5EcLu884HhRR6edCgfdRYSzLC/d+gHLg+e4YFBZ14T9Kk4D358
yoPZx1Gza88JHt0MVz/excPToBat/DsE4q2bZf0CHuw1flpbkUlgrLmkOkTG
Q/CG8OH3NwnOR05M2tzPA5Vk3FTBJQhddVXPSpOPpcLHNkcvEViJ3lnW/szH
noqqrFY2wY15FquNEvmwqTxYvNuP4OIf39JjLvLRsfzoj+U+BAnv3vU2XuHD
RW+xxHI7ASs4/PrZW3xsMndzbfZi+nn35fC3XD5MClsv9q0lqLBa96SBz4f/
6ITtcx0IeuYeMDn9iwDK8Dpj1hgNfrRzFH+5AG1fUnRNv9P4UK79fvkqAUpS
S6NqB2i8CsqN7V8vgOkVXohRLw12lmpzwF4B/ihSH/5dQEN/bvK5ZRcE8MvJ
jdWvoAHLvMFegQA3+GoR+hwaum69ws9SAYY22nb4nqJBH5jf0EMLIGnoWHH1
BA1u3rV79IAAPurbFZpHaYy6/7lDNlmIbfPeZj8MpfE60i2fWiSEQXpBsooH
DaeijmN1bCFeRHZertKgMVWkG1Z7RohcfR3n0Ik0JJM8vWsShdjukfFETZXG
lc3FDtVXhKhdpyOxHVDim/gOrzxbiFmc+LDlIiWeax1cVdgkxN3XmwN2FSnh
4DtO/aG5CK6Twli3IpU4eG+hlYG1COKlTjtswpV4OLDXlW0nwgOyhf9wvxLW
KeWnfZaIkPDW58l1PyVm15zTUPMUYawvYLzjWiWmr9DT3HVEhK8yzmwbAyV6
59hoTW8Q4Vx39ZB5rgL2EX62cS0i5OzGi085Chx4k7he0i7C5Ddejzn3FZD5
fk4sEItg30ZvauEqwE95MYU1IgLLRaRidFKBBjXnaSVWYjxatcLU31OBJ/It
OlHxYlguHHl/h5KjWYt+x2aLYZqrsmSwTY5Bh4T4i2fEcNEy2Lu6SY4VMS9k
jy+K0Rw6T1RZJsf7CXpF8iwx7vSarzt7Xw6xUWvY7jox7lW7lbREymHo6VPu
bibBgMMXjUtjMiQ82xk7560EIdS0G/XjZJiqSvZwKyRI3VDWWTIoRZpHvIdB
jQQzZnKyHvVIkS3KMJ3yUQL1X4qLWZ1SNOpTZUO0BGta6Zi4PClM4vZoN8yU
wrqdd0o1XIqXq/dnH4uQwpev2r2zTgJp86HODjMZPiyar9caI4ZtIf0r5srA
Tno55UGYGBFZrPTrNjI0GkI7JkCM4ejA7XscZbi0sEe3x02MHw28GyTuMpQt
OqIVZCyGw44VZX3RMqwpGB+yv0iEmC6thxo1MrDs3OsPjQmhLrkftzhWDvZy
Iw1dbwEW3L5waEm8HJn90jvq7gL4BkQGgi3HmvjcIcK8o0ftSzx+S5Qjb9Hn
C1fNBdhW/87Q76YcJeo9QyzCR+Yr8b/sSjlSxqpetPzJh/P5OUONMxXoslh/
OPY6D6x1anSriQKrD5d/Ev/FQ4qanOowV+B1UcVU1xM8SI4/eSe2VaDuw8b0
7kAekqKcU4dXKpB5w8TuoDUPHf7+TnNYCmxzcOMMPKYQuyA9KuJfBfI433UM
n3ZjkkE0l/9GgYlqGnE+N7qRNuZVtrlMAW/vuU4JF7rxqnqSrmO9AkmaDnNu
s7oxtC/2+bBIgckmoTojs7sRm+79hT1dCT3TvNmKWV2InaAfcTlYCcfS2bQs
qx2a8r5U9QNKrFJGfrKKb0d6fW3RH4eViDE9PcNxaztecU9N841Xwvm+fmXx
+HYMOX17bJqiRLxT+DqO7yccCWsmd98owRIm2B+Z0IYjzclhr/VomO/u3+tk
3YKev1qs6w1pNM13OZ470ox9HjMlQjMa/hcc6bG6ZniWZARMsaHxmSPx5kU1
w/LJvW0BK2iYLfNyEBR+QN35N87qwcy/NZ2rvnZNEyxWK2ZsfkXDKvrYWV2T
eqSp2DXuL6SxQ1NPR1dWhymvDyXFldAIe38qpPhZHYYWfJuUVUPjuldyoeFv
dagzHacyxKOx6W3twpBPNYj9rifL0GT2nkJWQvy6KtQ+dSmQ+xJsqDSQRp14
i7FJkT2i3QRsrlawpepb2AXcnM3bR7DjyoPKorhiJE1VPdV6kMmNk9HFmZFF
2BhWsKGUyYWIiGMJH24WoNHyF4qbTWB4wqV91rXnGP+//dppOQSbkipb9hx4
hoUfLq9OeUFwDlcmJix/iuQTX+9y3hDkXV7sPtrwGFu6n0bEMDl5+dTEygmZ
WTjpyM+M/Ehwmnt1W/XU23ieOL0lvJOg92RBSPrvN6G77NDSQCa3jyfmpMS5
p2FN8vWwXUzup4a6lqrwkxElr83Y0Uvg57KPe74mEXdWjtVv/UZQ26Ud6ZZz
Ap7R586UMXvNbKT4beuKxn9B9XgS
      "]], LineBox[CompressedData["
1:eJxN0GtIk3EYBfA1nZnpiKVpoZhmNi9klDTXhMSJVmrmtDSskb7Yp7wMsXrL
SDMLSllNmkYmlXPlDMEhUbjS2dQ0CmlFZioVQzIW27xsa26zAvufDjyc5/f1
hBWViYqZDAZD+Of+9lEdv7eFad7LWEmwIjU+wgPuyRK/uc+CM5YqT4Z6wwZl
w3KLD1wlam/e5Ac/7ng/GsCBUw4bqUZ/eIrh6VoXCPvl74rzDYZLvGSNzEiY
pe6IrebCrce1g65o+G2P2WaPg7dTWcdMfNjU57t1MhMWVG8elx6CryTFXxfm
/LeHtsCiyof3D6ie0xTcptt3JJCG80YuXxUp4L53ztlXDjjh0nABt8VCTIub
Mtjpc8RBasfEgBUufJCw4Yd8nljSd36sKWWBOIa+zXs6AwtVBxIf1i0Sh3uv
6g/eaSXuZMrMnnrYGcW9V1FjI7b9bHbmRtiJs6LuWj11cPlNZZlA8ouYL792
y8BxEI8OV+zxH4CflZurOKVLxKInaadq2U5iNVcxcU4Da3ifFw1iF3HEi/au
EDecI6mcmVS5iWO1oa/ZGcvE25LnpdMH4S0vh3K7suGNgyXTmXmw10ivpb4I
/jqWF7SWhuVfpMWrlbCskIr++Ahu+LbbpOyEaw1TZ1O7Ycn3mPo6DZxuHlZ7
6OE0yZ0z+g+wcK40sW0c5i8EDCVPw5F26lPNLBxO81qzjXCIw4cKM8Hrnd3G
/gWYfaGu+4YNXuPOP33CAbMuxgp2uOCVJP17fgNooxal
      "]]}, {}}, {{}, {}, {}}},
  Axes->True,
  AxesOrigin->{0, 0},
  PlotRange->{{0., 2.}, {0., 1.}},
  PlotRangeClipping->True,
  PlotRangePadding->{
    Scaled[0.02], 
    Scaled[0.02]}]], "Output",
 CellChangeTimes->{{3.5163575433125*^9, 3.516357563890625*^9}, {
   3.516357770375*^9, 3.516357785625*^9}, 3.516357818453125*^9, 
   3.516358480515625*^9, 3.51635857334375*^9, 3.516359046875*^9, 
   3.516362337671875*^9, 3.516362632625*^9, 3.5353724932538757`*^9, 
   3.5353963540625*^9, 3.535527566109375*^9, 3.535527625390625*^9, {
   3.53552788609375*^9, 3.535527915765625*^9}, 3.535528025078125*^9, 
   3.535528728609375*^9, 3.535541124046875*^9, 3.5684467824579315`*^9, 
   3.568449497409127*^9, 3.568450527269169*^9, 3.5684505834517865`*^9, 
   3.568450687322172*^9, 3.568451033816059*^9, 3.568451065358059*^9, 
   3.568451205188059*^9, 3.5684548610899267`*^9, 3.5684568249723043`*^9, 
   3.568456937324538*^9, 3.5684571296057644`*^9, 3.568457455169836*^9, 
   3.5684588433721333`*^9, 3.568458976058401*^9, 3.5684590571565094`*^9, 
   3.56846268350014*^9, 3.5685213330936728`*^9, 3.568522191120415*^9, 
   3.568522311184415*^9, 3.5685243581706457`*^9, 3.568524498646646*^9, 
   3.571999397843683*^9, 3.572000370393123*^9, 3.572000500106844*^9, 
   3.5720005555379047`*^9, 3.572000709932992*^9, 3.5720010885053024`*^9, 
   3.5720011241047306`*^9, 3.572001203236124*^9, 3.5720039005962315`*^9, 
   3.572005062167939*^9, 3.572008637036645*^9, 3.5720092480207376`*^9, 
   3.572161673430622*^9, 3.572167676775934*^9, {3.5757769153445644`*^9, 
   3.57577693790376*^9}, {3.575777024378009*^9, 3.5757770314658117`*^9}, 
   3.5757998741478996`*^9, 3.5774506281798677`*^9, 3.5774506614601955`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["qma"], "Input"],

Cell[BoxData[
 RowBox[{"0.0009288545107381848`", " ", 
  RowBox[{"(", 
   RowBox[{"1", "+", 
    RowBox[{"Sign", "[", 
     RowBox[{"100000", "-", "pp2"}], "]"}]}], ")"}], " ", 
  RowBox[{"(", 
   RowBox[{"1", "+", 
    RowBox[{
     FractionBox["1", "2"], " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"-", "1"}], "-", 
       RowBox[{"Sign", "[", 
        RowBox[{
         RowBox[{"-", "0.5282817877171742`"}], "+", 
         FractionBox["pp2", "100000"]}], "]"}]}], ")"}]}], "+", 
    RowBox[{"0.6825183070934947`", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"-", "0.31622776601683794`"}], "+", 
       SqrtBox[
        RowBox[{"0.1`", "\[VeryThinSpace]", "+", 
         RowBox[{"14.929920000000003`", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"7.196856730011519`*^-8", " ", 
             SuperscriptBox["pp2", "1.4285714285714286`"]}], "-", 
            RowBox[{"2.682695795279729`*^-9", " ", 
             SuperscriptBox["pp2", "1.7142857142857142`"]}]}], ")"}]}]}]]}], 
      ")"}], " ", 
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"Sign", "[", 
        RowBox[{
         RowBox[{"-", "0.5282817877171742`"}], "+", 
         FractionBox["pp2", "100000"]}], "]"}]}], ")"}]}]}], 
   ")"}]}]], "Output",
 CellChangeTimes->{
  3.516362632640625*^9, 3.5353724935505433`*^9, 3.53539635434375*^9, 
   3.535527566171875*^9, 3.535527625484375*^9, {3.53552788615625*^9, 
   3.535527915828125*^9}, 3.53552802515625*^9, 3.53552872884375*^9, 
   3.535541124875*^9, 3.5684467832619314`*^9, 3.568449497452136*^9, 
   3.568450527293171*^9, 3.56845058348479*^9, 3.568450687352175*^9, 
   3.568451034113059*^9, 3.5684510654090595`*^9, 3.568451205221059*^9, 
   3.5684548613899565`*^9, 3.568456825045312*^9, 3.568456937369543*^9, 
   3.5684571296637707`*^9, 3.568457455204836*^9, 3.5684588434391403`*^9, 
   3.568458976094404*^9, 3.5684590572155156`*^9, 3.5684626835301433`*^9, 
   3.5685213331406775`*^9, 3.568522191156415*^9, 3.568522311234415*^9, 
   3.568524358213646*^9, 3.5685244986886463`*^9, 3.5719993978592844`*^9, 
   3.572000370408723*^9, 3.5720005001380434`*^9, 3.5720005555847044`*^9, 
   3.572000709964192*^9, 3.5720010885365024`*^9, 3.572001124135931*^9, 
   3.572001203267324*^9, 3.572003900611831*^9, 3.5720050621835394`*^9, 
   3.572008637058647*^9, 3.5720092480487404`*^9, 3.5721616734536247`*^9, 
   3.572167676793936*^9, {3.5757769153757877`*^9, 3.5757769379349833`*^9}, {
   3.575777024534128*^9, 3.5757770314970355`*^9}, 3.5757998741728992`*^9, 
   3.5774506282108707`*^9, 3.5774506618432336`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["Tp1"], "Input",
 CellChangeTimes->{3.568457027374542*^9}],

Cell[BoxData["200"], "Output",
 CellChangeTimes->{{3.516357543578125*^9, 3.5163575639375*^9}, {
   3.516357770421875*^9, 3.51635778565625*^9}, 3.5163578185*^9, 
   3.5163584805625*^9, 3.516358573390625*^9, 3.516359046953125*^9, 
   3.51636233778125*^9, 3.516362632671875*^9, 3.5353724935973854`*^9, 
   3.535396354375*^9, 3.535527566234375*^9, 3.535527625546875*^9, {
   3.535527886234375*^9, 3.53552791590625*^9}, 3.53552802521875*^9, 
   3.5355287289375*^9, 3.53554112496875*^9, 3.5684467835429316`*^9, 
   3.568449497481142*^9, 3.568450527323174*^9, 3.5684505835197935`*^9, 
   3.5684506874011803`*^9, 3.568451034179059*^9, 3.5684510654510593`*^9, 
   3.5684512052530594`*^9, 3.568454861448962*^9, 3.568456825111318*^9, 
   3.5684569374235487`*^9, 3.5684571297297773`*^9, 3.568457455249836*^9, 
   3.568458843498146*^9, 3.56845897614841*^9, 3.5684590572885227`*^9, 
   3.568462683564147*^9, 3.56852133316768*^9, 3.5685221912944155`*^9, 
   3.5685223113134155`*^9, 3.5685243582696457`*^9, 3.568524498715646*^9, 
   3.571999397890487*^9, 3.5720003704399233`*^9, 3.5720005001536436`*^9, 
   3.572000555615905*^9, 3.5720007099953923`*^9, 3.572001088567703*^9, 
   3.5720011241671305`*^9, 3.5720012032985244`*^9, 3.572003900643031*^9, 
   3.5720050622147393`*^9, 3.572008637093651*^9, 3.5720092480807433`*^9, 
   3.5721616734746265`*^9, 3.5721676768169384`*^9, {3.5757769153914003`*^9, 
   3.5757769379662075`*^9}, {3.5757770245653515`*^9, 3.575777031512647*^9}, 
   3.5757998741958995`*^9, 3.577450628242874*^9, 3.577450661876237*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{"qmp2", " ", "=."}]], "Input",
 CellChangeTimes->{
  3.51635742365625*^9, {3.5685244924726458`*^9, 3.568524493457646*^9}, 
   3.572001119533901*^9}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"nmax", "=", "100"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"qmlist", "=", 
   RowBox[{"Array", "[", 
    RowBox[{"a1", ",", "nmax"}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"qmdlist", "=", 
   RowBox[{"Array", "[", 
    RowBox[{"a2", ",", 
     RowBox[{"{", 
      RowBox[{"nmax", ",", "2"}], "}"}]}], "]"}]}], ";"}]}], "Input"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"For", "[", 
   RowBox[{
    RowBox[{"i", "=", "1"}], ",", 
    RowBox[{"i", "<", 
     RowBox[{"nmax", "+", "1"}]}], ",", 
    RowBox[{"i", "++"}], ",", "\n", "\t", 
    RowBox[{
     RowBox[{"pp2", " ", "=", " ", 
      RowBox[{"pp1", " ", "2", " ", 
       RowBox[{"i", "/", "nmax"}]}]}], ";", "\n", "\t", 
     RowBox[{
      RowBox[{"qmdlist", "[", 
       RowBox[{"[", "i", "]"}], "]"}], "=", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"pp2", "/", "pp1"}], ",", 
        RowBox[{"AFa1", "[", 
         RowBox[{"pp1", ",", "pp2"}], "]"}]}], "}"}]}]}]}], "\n", "]"}], 
  ";"}], "\n", 
 RowBox[{"ListPlot", "[", "qmdlist", "]"}]}], "Input",
 CellChangeTimes->{{3.516362477359375*^9, 3.5163624785625*^9}, {
  3.516362600109375*^9, 3.516362601453125*^9}}],

Cell[BoxData[
 GraphicsBox[{{}, 
   {Hue[0.67, 0.6, 0.6], PointBox[CompressedData["
1:eJxdkktIVFEYxw9RGzcRzELC7GGLaRFBruUbiNIeUDNdamzuKEQNLgQnyAKj
RcSkO120qHClV0iooSDIIAO1CGkMK2vGKEvHyvKRPa7deXfO/c6cA9+BYeY3
M/d7/H9n++m2wNl1jLEz/CXeL3ni9bMd14FNdn160dYEyJbioerYon8oTn5/
oPjWTXEekf8/UbzkF9+MkOefKq5I9kfrKp6TeuOKd5ndo7Y3Qeq/VGzxp5P9
k6TfK8W17nlD+k8pHrO9vMNbMk9SccBtmCLzTSue7RAF35N5Pyg+J8aLfiTz
zyhm7vlM9tHcgA2AeYbTj1vL+3FuqR8wGptAdDO754AdGXw9U1veNw2sa8ed
ynwYcB3OwXsrt++H5f7zwNYPXNlihGGrGKf6C7BoILIwZ8o8OKfePQyFTYi4
5yuwYzfOW6Mhmc83YEbV3bFNIRDVPHHOqf2dsYOnZF4LwHZ2+tpbGmFNlLM5
OxeXE61Bmd93Xm/zhmbjJLjx1P0AZvX1Xqg6IfPkPF+5e3DEAHe82CLfr8bu
geMy3yVgvcNWc48fJhLicG7YYweCR2Xeyzy/y88ObTwM7rqeFWDbxiPXag7I
/Dl7r6YnTB+45cyfwFanp/b17ZU+VuU7Y7iPZvSjGffTjL5+KcZ9NaM/zbj/
b8XoUzPmoRn9/lGM+WhG35oxr7+K0b9mzE8z3gdbMeapGe+HZsx3TTHeF82Y
t2a8P/8UY/6a8T5pxuMQHw7x4RAfDvGRIT4yxEeG+MgSH1niI0t85IiPHPGR
Iz7yxEee+MgTHwXio0B8FIiPIvFRJD6KxEeJ+CgRHyXig/nKH/4DmnREPg==

     "]]}, {}},
  AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948],
  Axes->True,
  AxesOrigin->{0, 0},
  PlotRange->{{0., 2.}, {0., 0.001857709021476417}},
  PlotRangeClipping->True,
  PlotRangePadding->{
    Scaled[0.02], 
    Scaled[0.02]}]], "Output",
 CellChangeTimes->{{3.516357543828125*^9, 3.51635756403125*^9}, {
   3.5163577705*^9, 3.51635778575*^9}, 3.516357818578125*^9, 
   3.51635848065625*^9, 3.51635857346875*^9, 3.516359047046875*^9, 
   3.51636233790625*^9, 3.516362632765625*^9, 3.535372495268094*^9, 
   3.53539635609375*^9, 3.535527567734375*^9, 3.535527627*^9, {
   3.535527887703125*^9, 3.5355279174375*^9}, 3.535528026640625*^9, 
   3.5355287294375*^9, 3.535541125375*^9, 3.568446783649931*^9, 
   3.568449497636173*^9, 3.568450527472189*^9, 3.5684505839378347`*^9, 
   3.5684506875281925`*^9, 3.5684510342980595`*^9, 3.568451065592059*^9, 
   3.5684512053470592`*^9, 3.5684548615829754`*^9, 3.568456825241331*^9, 
   3.568456937526559*^9, 3.56845712985779*^9, 3.5684574553718357`*^9, 
   3.568458843610157*^9, 3.568458976271422*^9, 3.568459057780572*^9, 
   3.568462683684159*^9, 3.568521333294693*^9, 3.5685221914334154`*^9, 
   3.568522311430415*^9, 3.568524358389646*^9, 3.568524498877646*^9, 
   3.5719993979840956`*^9, 3.572000370533524*^9, 3.5720005002472444`*^9, 
   3.572000555927907*^9, 3.5720007101045933`*^9, 3.5720010886769037`*^9, 
   3.572001124276332*^9, 3.572001203376525*^9, 3.572003900721032*^9, 
   3.57200506229274*^9, 3.5720086371836596`*^9, 3.572009248166752*^9, 
   3.5721616735586348`*^9, 3.5721676768939457`*^9, {3.5757769155006833`*^9, 
   3.5757769380442667`*^9}, {3.5757770246590233`*^9, 3.575777031590707*^9}, 
   3.5757998742848997`*^9, 3.5774506283748875`*^9, 3.5774506619822474`*^9}]
}, Open  ]],

Cell[BoxData[{
 RowBox[{
  RowBox[{"eps", " ", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"kappa", " ", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"R", " ", "=", " ", "."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"cv", " ", "=", " ", "."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Cd", " ", "=", " ", "."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"A0", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Tp1", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Tp2", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"pp1", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"pp2", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"p10", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"p20", "=."}], ";"}]}], "Input",
 CellChangeTimes->{
  3.51636247978125*^9, 3.516362602484375*^9, {3.5684570291057158`*^9, 
   3.568457058120617*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"keps", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Kg", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Ndenom", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"crit", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"onPositive", "[", "x_", "]"}], "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"onNegative", "[", "x_", "]"}], "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"signedSquareL", "[", 
    RowBox[{"x_", ",", "x0_"}], "]"}], "=."}], ";"}]}], "Input",
 CellChangeTimes->{{3.535390680515625*^9, 3.53539068203125*^9}, 
   3.568457416721836*^9}]
}, Closed]]
}, Open  ]],

Cell["Equations", "Subsection",
 CellChangeTimes->{{3.5720181646087046`*^9, 3.572018175085304*^9}}],

Cell["Calculation of parameters", "Text"],

Cell[BoxData[
 RowBox[{
  RowBox[{"localExpressions", " ", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"kappa", "==", 
      RowBox[{"1", "+", 
       FractionBox["R", "cv"]}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"keps", "==", 
      FractionBox["1", 
       RowBox[{
        RowBox[{"-", 
         SqrtBox["eps"]}], "+", 
        SqrtBox[
         RowBox[{"1", "+", "eps"}]]}]]}], ",", "\[IndentingNewLine]", 
     RowBox[{"Kg", "==", 
      SqrtBox[
       RowBox[{
        FractionBox["kappa", "R"], 
        SuperscriptBox[
         RowBox[{"(", 
          FractionBox["2", 
           RowBox[{"kappa", "+", "1"}]], ")"}], 
         FractionBox[
          RowBox[{"kappa", "+", "1"}], 
          RowBox[{"kappa", "-", "1"}]]]}]]}], ",", "\[IndentingNewLine]", 
     RowBox[{"Ndenom", "==", 
      RowBox[{
       FractionBox[
        RowBox[{"kappa", "-", "1"}], "2"], 
       SuperscriptBox[
        RowBox[{"(", 
         FractionBox["2", 
          RowBox[{"kappa", "+", "1"}]], ")"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"kappa", "+", "1"}], ")"}], "/", 
         RowBox[{"(", 
          RowBox[{"kappa", "-", "1"}], ")"}]}]]}]}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"crit", "==", 
      SuperscriptBox[
       RowBox[{"(", 
        FractionBox["2", 
         RowBox[{"kappa", "+", "1"}]], ")"}], 
       RowBox[{"kappa", "/", 
        RowBox[{"(", 
         RowBox[{"kappa", "-", "1"}], ")"}]}]]}], ",", "\[IndentingNewLine]", 
     RowBox[{"cp", "==", 
      RowBox[{"cv", "+", "R"}]}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{
  3.4458556656834745`*^9, {3.535528705078125*^9, 3.5355287096875*^9}, {
   3.572017731163913*^9, 3.5720178003058677`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemEquationsDA", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"qmp2", "==", 
      RowBox[{"(", " ", 
       RowBox[{
        RowBox[{
         RowBox[{"onPositive", "[", 
          RowBox[{"pp1", "-", "pp2"}], "]"}], " ", "qma"}], " ", "-", " ", 
        RowBox[{
         RowBox[{"onNegative", "[", 
          RowBox[{"pp1", "-", "pp2"}], "]"}], " ", "qmb"}]}], ")"}]}], ",", 
     "\n", "\t\t", 
     RowBox[{"dEp1", "==", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"onPositive", "[", "qmp1e", "]"}], " ", "qmp1e", " ", "cp", 
         " ", "Tp2"}], "+", 
        RowBox[{
         RowBox[{"onNegative", "[", "qmp1e", "]"}], "qmp1e", " ", "cp", " ", 
         "Tp1"}], "+", 
        RowBox[{"R", " ", 
         RowBox[{"onPositive", "[", "qmp1e", "]"}], " ", "qmp1e", " ", "Tp2", 
         " ", 
         RowBox[{"(", 
          RowBox[{"1", "-", 
           FractionBox["pp1", "pp2"]}], ")"}]}]}], ")"}]}], ",", "\n", "\t\t", 
     RowBox[{"dEp2", "==", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"onPositive", "[", "qmp2", "]"}], " ", "qmp2", " ", "cp", 
         " ", "Tp1"}], "+", 
        RowBox[{
         RowBox[{"onNegative", "[", "qmp2", "]"}], "qmp2", " ", "cp", " ", 
         "Tp2"}], "+", 
        RowBox[{"R", " ", 
         RowBox[{"onPositive", "[", "qmp2", "]"}], " ", "qmp2", " ", "Tp1", 
         " ", 
         RowBox[{"(", 
          RowBox[{"1", "-", 
           FractionBox["pp2", "pp1"]}], ")"}]}]}], ")"}]}]}], "\t\t", "\n", 
    "\t", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.516357230546875*^9, 3.51635723375*^9}, {
   3.516357406265625*^9, 3.51635741015625*^9}, {3.516357489421875*^9, 
   3.5163574921875*^9}, {3.516358561203125*^9, 3.5163585623125*^9}, {
   3.5163588638125*^9, 3.516358872546875*^9}, 3.5163622335*^9, 
   3.516362283375*^9, 3.516362316140625*^9, {3.516362447*^9, 
   3.51636244796875*^9}, {3.51636254234375*^9, 3.516362542796875*^9}, {
   3.53552809378125*^9, 3.53552809640625*^9}, {3.535528183453125*^9, 
   3.53552818775*^9}, {3.5684570204198475`*^9, 3.568457022761081*^9}, {
   3.5684570541492195`*^9, 3.5684570555233574`*^9}, {3.5684589588056755`*^9, 
   3.5684589653553305`*^9}, {3.5720176679082947`*^9, 3.572017683947212*^9}, 
   3.5720179338355055`*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemVariables", " ", "=", " ", 
   RowBox[{"{", 
    RowBox[{"qmp2", ",", "dEp1", ",", "dEp2", ",", "pp1", ",", "pp2"}], 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.572018112971751*^9, 3.5720181129797516`*^9}}],

Cell[CellGroupData[{

Cell["Boundarys", "Subsection"],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemBoundaryEquations", " ", "=", " ", 
   RowBox[{"{", " ", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"pp1", " ", "==", " ", 
      RowBox[{"(", 
       RowBox[{"cp1", " ", "+", " ", 
        RowBox[{"Zcp1", " ", "dEp1"}]}], " ", ")"}]}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"pp2", " ", "==", 
      RowBox[{"(", 
       RowBox[{"cp2", " ", "+", " ", 
        RowBox[{"Zcp2", " ", "dEp2"}]}], " ", ")"}]}]}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535370830684037*^9, 3.535370830684037*^9}, {
  3.572017824436248*^9, 3.5720178479275913`*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["systemVariables"], "Input",
 CellChangeTimes->{{3.516358997828125*^9, 3.51635900259375*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"qmp2", ",", "dEp1", ",", "dEp2", ",", "pp1", ",", "pp2"}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.516362632921875*^9, 3.5353724958770447`*^9, 3.5353963570625*^9, 
   3.535527574*^9, 3.535527627859375*^9, {3.53552788959375*^9, 
   3.5355279191875*^9}, 3.53552802840625*^9, 3.53552873065625*^9, 
   3.53554112640625*^9, 3.568446783804931*^9, 3.5684494977962046`*^9, 
   3.5684505279102325`*^9, 3.5684505842968707`*^9, 3.56845068769621*^9, 
   3.568451034486059*^9, 3.5684510661750593`*^9, 3.5684512054890594`*^9, 
   3.5684548617459917`*^9, 3.5684568254373507`*^9, 3.5684569377735834`*^9, 
   3.568457130136818*^9, 3.5684574559158363`*^9, 3.568458844300226*^9, 
   3.568458977089504*^9, 3.5684590581376076`*^9, 3.568462683879178*^9, 
   3.568521333518715*^9, 3.568522191641415*^9, 3.5685223117574153`*^9, 
   3.568524359115646*^9, 3.568524499516646*^9, 3.571999398233718*^9, 
   3.572000370798726*^9, 3.572000500528046*^9, 3.572000556255509*^9, 
   3.5720007104945955`*^9, 3.572001089066906*^9, 3.5720011246975346`*^9, 
   3.5720012037977276`*^9, 3.572003901064234*^9, 3.572005062651542*^9, 
   3.5720086376607075`*^9, 3.572009249417877*^9, 3.572161673640643*^9, 
   3.572167676982955*^9, {3.575776915688026*^9, 3.5757769381379385`*^9}, {
   3.5757770247683067`*^9, 3.575777031684378*^9}, 3.5757998743928995`*^9, 
   3.577450628518902*^9, 3.5774506621122603`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell["Expressions", "Subsection"],

Cell["\<\
The inlet flow is calculated as the outlet flow with reversed sign.\
\>", "Text"],

Cell[BoxData[
 RowBox[{
  RowBox[{"expressions", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"qmp1", "==", 
     RowBox[{"-", "qmp2"}]}], "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.5353708746398582`*^9, 3.535370878803109*^9}, {
   3.5720178526758633`*^9, 3.572017860102288*^9}, 3.5720180575065784`*^9}],

Cell["Initial values", "Text",
 Evaluatable->False],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"cp1", "/.", 
  RowBox[{
   RowBox[{"Solve", "[", 
    RowBox[{"systemBoundaryEquations", ",", 
     RowBox[{"{", 
      RowBox[{"cp1", ",", "cp2"}], "}"}]}], "]"}], "[", 
   RowBox[{"[", "1", "]"}], "]"}]}]], "Input",
 CellChangeTimes->{
  3.535527594203125*^9, {3.572017881364504*^9, 3.572017887580859*^9}}],

Cell[BoxData[
 RowBox[{"pp1", "-", 
  RowBox[{"dEp1", " ", "Zcp1"}]}]], "Output",
 CellChangeTimes->{{3.51635754484375*^9, 3.51635756409375*^9}, {
   3.5163577705625*^9, 3.5163577858125*^9}, 3.516357818640625*^9, 
   3.51635848071875*^9, 3.516358573546875*^9, 3.516359047125*^9, 
   3.51636233821875*^9, 3.51636263284375*^9, 3.535372495658447*^9, 
   3.53539635675*^9, 3.535527573*^9, 3.5355276274375*^9, {
   3.535527888515625*^9, 3.53552791825*^9}, 3.53552802746875*^9, 
   3.53552873053125*^9, 3.53554112625*^9, 3.5684467837339315`*^9, 
   3.5684494977401934`*^9, 3.568450527563198*^9, 3.568450584146856*^9, 
   3.5684506876142015`*^9, 3.5684510344060593`*^9, 3.5684510657200594`*^9, 
   3.568451205436059*^9, 3.5684548616709843`*^9, 3.568456825351342*^9, 
   3.568456937648571*^9, 3.5684571299708014`*^9, 3.568457455447836*^9, 
   3.568458843696166*^9, 3.568458976783473*^9, 3.568459057902584*^9, 
   3.568462683755166*^9, 3.568521333382702*^9, 3.568522191517415*^9, 
   3.568522311578415*^9, 3.568524358527646*^9, 3.568524499028646*^9, 
   3.5719993981089067`*^9, 3.572000370642725*^9, 3.5720005003720455`*^9, 
   3.572000556068308*^9, 3.5720007101981936`*^9, 3.572001088770504*^9, 
   3.5720011243855324`*^9, 3.5720012034857254`*^9, 3.572003900923833*^9, 
   3.5720050624799414`*^9, 3.572008637351677*^9, 3.572009248264762*^9, 
   3.572161673668646*^9, 3.5721676770149584`*^9, {3.5757769157192497`*^9, 
   3.575776938184774*^9}, {3.575777024815142*^9, 3.575777031715602*^9}, 
   3.5757998745828996`*^9, 3.577450628969947*^9, 3.577450662156265*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\\"typename\\\" \[Rule] \\\"PneumaticOrifice\\\"\\)\\), \
\\(\\(\\\"displayname\\\" \[Rule] \\\"PneumaticOrifice\\\"\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"PneumaticOrifice.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"PneumaticOrifice.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \\(\\({\\(\
\[LeftSkeleton] 1 \[RightSkeleton]\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\
\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"hopsanobjectappearance\\\", \
\\(\\({\\\"version\\\" \[Rule] \\\"0.1\\\"}\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"modelobject\\\", \\(\\({\\(\\(\\\"typename\\\" \
\[Rule] \\\"PneumaticOrifice\\\"\\)\\), \\(\\(\\\"displayname\\\" \[Rule] \
\\\"PneumaticOrifice\\\"\\)\\)}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\
\\\", \\(\\({\\(\\(\\\"isopath\\\" \[Rule] \
\\\"PneumaticOrifice.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \[Rule] \\\"ON\
\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"PneumaticOrifice.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \\(\\({\\(\
\[LeftSkeleton] 1 \[RightSkeleton]\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)\
\\)\\)]\\)\[NoBreak] is not a list of contents. The third item in an \
XMLElement must be a list of contents, even if it is an empty list. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, {3.5757769158597565`*^9, 
   3.5757769383096695`*^9}, {3.5757770249400377`*^9, 3.5757770318248854`*^9}, 
   3.5757998747118998`*^9, 3.5774506291789675`*^9, 3.577450662320281*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, {3.5757769158597565`*^9, 
   3.5757769383096695`*^9}, {3.5757770249400377`*^9, 3.5757770318248854`*^9}, 
   3.5757998747118998`*^9, 3.5774506291789675`*^9, 3.5774506623232813`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.3333333333333333`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"y\\\" \[Rule] 0.3333333333333333`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, {3.5757769158597565`*^9, 
   3.5757769383096695`*^9}, {3.5757770249400377`*^9, 3.5757770318248854`*^9}, 
   3.5757998747118998`*^9, 3.5774506291789675`*^9, 3.5774506623242817`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, {3.5757769158597565`*^9, 
   3.5757769383096695`*^9}, {3.5757770249400377`*^9, 3.5757770318248854`*^9}, 
   3.5757998747118998`*^9, 3.5774506291789675`*^9, 3.577450662325282*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.6666666666666666`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"y\\\" \[Rule] 0.6666666666666666`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, {3.5757769158597565`*^9, 
   3.5757769383096695`*^9}, {3.5757770249400377`*^9, 3.5757770318248854`*^9}, 
   3.5757998747118998`*^9, 3.5774506291789675`*^9, 3.577450662326282*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, {3.5757769158597565`*^9, 
   3.5757769383096695`*^9}, {3.5757770249400377`*^9, 3.5757770318248854`*^9}, 
   3.5757998747118998`*^9, 3.5774506291789675`*^9, 3.577450662327282*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, {3.5757769158597565`*^9, 
   3.5757769383096695`*^9}, {3.5757770249400377`*^9, 3.5757770318248854`*^9}, 
   3.5757998747118998`*^9, 3.5774506291789675`*^9, 3.5774506623282824`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.5`\\)\[NoBreak] in \[NoBreak]\\!\\(\\\"x\
\\\" \[Rule] 0.5`\\)\[NoBreak] is not a valid value for an attribute in an \
XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, {3.5757769158597565`*^9, 
   3.5757769383096695`*^9}, {3.5757770249400377`*^9, 3.5757770318248854`*^9}, 
   3.5757998747118998`*^9, 3.5774506291789675`*^9, 3.577450662330282*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \
\[NoBreak]\\!\\(\\*StyleBox[\\(XMLElement :: attrhs\\), \
\\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this calculation. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \
ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, {3.5757769158597565`*^9, 
   3.5757769383096695`*^9}, {3.5757770249400377`*^9, 3.5757770318248854`*^9}, 
   3.5757998747118998`*^9, 3.5774506291789675`*^9, 3.5774506623312826`*^9}],

Cell[BoxData["\<\"PneumaticOrifice.xml\"\>"], "Output",
 CellChangeTimes->{{3.516357545078125*^9, 3.516357564140625*^9}, {
   3.516357770609375*^9, 3.516357785859375*^9}, 3.5163578186875*^9, 
   3.51635848075*^9, 3.51635857378125*^9, 3.51635862859375*^9, 
   3.516359047640625*^9, 3.51636233865625*^9, 3.516362633109375*^9, 
   3.5353725030126877`*^9, 3.535396357890625*^9, 3.53552757490625*^9, 
   3.535527628671875*^9, {3.535527890390625*^9, 3.535527920171875*^9}, 
   3.5355280291875*^9, 3.535528731453125*^9, 3.53554112721875*^9, 
   3.568446783942931*^9, 3.5684494980032463`*^9, 3.5684505281202536`*^9, 
   3.568450584596901*^9, 3.568450687890229*^9, 3.568451034686059*^9, 
   3.568451066415059*^9, 3.5684512056800594`*^9, 3.5684548619330106`*^9, 
   3.568456825756383*^9, 3.568456937921598*^9, 3.56845713066087*^9, 
   3.568457456232836*^9, 3.5684588444722433`*^9, 3.5684589774155364`*^9, 
   3.568459058409635*^9, 3.5684626840421944`*^9, 3.5685213338237457`*^9, 
   3.5685221919124155`*^9, 3.568522311929415*^9, 3.568524359283646*^9, 
   3.568524499665646*^9, 3.571999398436536*^9, 3.572000370985927*^9, 
   3.572000500699647*^9, 3.5720005565051107`*^9, 3.572000710619396*^9, 
   3.572001089207307*^9, 3.5720011248223352`*^9, 3.5720012039225283`*^9, 
   3.572003901235835*^9, 3.5720050628075433`*^9, 3.572008638573799*^9, 
   3.572009249556891*^9, 3.572161673789658*^9, 3.572167677139971*^9, {
   3.5757769159065924`*^9, 3.575776938340893*^9}, {3.5757770249556494`*^9, 
   3.575777031840497*^9}, 3.5757998747218995`*^9, 3.5774506291899686`*^9, 
   3.577450662332282*^9}]
}, Open  ]]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell["T connection", "Section",
 CellChangeTimes->{{3.5353721095590158`*^9, 3.53537211830196*^9}, 
   3.5353722343957663`*^9, {3.572195829972666*^9, 3.5721958372990847`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Pneumatic\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<Tconnection\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Pneumatic T-connection\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentQ\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFilenames", "[", 
   RowBox[{"defaultPath", ",", "domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.513785360140625*^9, 3.513785397734375*^9}, 
   3.5137854683125*^9, 3.5153945210188417`*^9, {3.51608651940625*^9, 
   3.516086528875*^9}, {3.516356859703125*^9, 3.516356873*^9}, {
   3.5353705928437004`*^9, 3.5353705930310946`*^9}, {3.535528004859375*^9, 
   3.535528013828125*^9}, {3.572195843790456*^9, 3.5721958550080976`*^9}, 
   3.5757768101731896`*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "Cd", ",", "0.65", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Discharge coefficient\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "R", ",", "287.", ",", "double", ",", "\"\<J/Kg K\>\"", ",", 
       "\"\<Gas constant\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "cv", ",", "718", ",", "double", ",", "\"\<J/Kg K\>\"", ",", 
       "\"\<heatcoeff\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "eps", ",", "0.02", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Linearisation coeff\>\""}], "}"}]}], "\[IndentingNewLine]", 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535370565329912*^9, 3.5353705653455253`*^9}, {
   3.535370598980867*^9, 3.535370607569777*^9}, {3.535370682449456*^9, 
   3.535370772725971*^9}, 3.5355279035625*^9, {3.572017994427971*^9, 
   3.5720180086697855`*^9}}],

Cell["\<\
qmp1 = qp1;
qmp2 = qp2;\
\>", "Text",
 CellChangeTimes->{{3.5685212396426315`*^9, 3.56852125718814*^9}, 
   3.5720004773150973`*^9}],

Cell[CellGroupData[{

Cell["The system of equations", "Subsection",
 Evaluatable->False,
 PageBreakAbove->False],

Cell["The flow at inlet and outlet are equal but with oposit sign.", "Text"]
}, Open  ]],

Cell["Equations", "Subsection",
 CellChangeTimes->{{3.5720181646087046`*^9, 3.572018175085304*^9}}],

Cell["Calculation of parameters", "Text"],

Cell[BoxData[
 RowBox[{
  RowBox[{"nodeConnections", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"PneumaticQnode", "[", 
      RowBox[{"1", ",", "100000.", ",", "\"\<fluid port 1\>\""}], "]"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"PneumaticQnode", "[", 
      RowBox[{"2", ",", "100000.", ",", "\"\<fluid port 2\>\""}], "]"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"PneumaticQnode", "[", 
      RowBox[{"2", ",", "100000.", ",", "\"\<fluid port 3\>\""}], "]"}]}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535370789690829*^9, 3.5353707897064214`*^9}, 
   3.53552777309375*^9, {3.535542211390625*^9, 3.535542214078125*^9}, {
   3.535542265921875*^9, 3.535542311625*^9}, {3.5684508318796263`*^9, 
   3.5684508487293115`*^9}, {3.5684511750240593`*^9, 
   3.5684511760840592`*^9}, {3.5720179665203743`*^9, 3.572017974399825*^9}, {
   3.572195954933813*^9, 3.5721959646283674`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemEquationsDA", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{
      RowBox[{"qm1", "+", "qm2", "+", "qm3"}], "\[Equal]", "0"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"dE1", "+", "dE2", "+", "dE3"}], "\[Equal]", "0"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"dE1", "==", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"OnPositive", "[", "qm1", "]"}], " ", "qm1", " ", "cp", " ", 
         "T0"}], "+", 
        RowBox[{
         RowBox[{"OnNegative", "[", "qm1", "]"}], "qm1", " ", "cp", " ", 
         "T1"}]}], ")"}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"dE2", "==", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"OnPositive", "[", "qm2", "]"}], "qm2", " ", "cp", " ", 
         "T0"}], "+", 
        RowBox[{
         RowBox[{"OnNegative", "[", "qm2", "]"}], "qm2", " ", "cp", " ", 
         "T2"}]}], ")"}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"dE3", "==", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"OnPositive", "[", "qm3", "]"}], "qm3", " ", "cp", " ", 
         "T0"}], "+", 
        RowBox[{
         RowBox[{"OnNegative", "[", "qm3", "]"}], "qm3", " ", "cp", " ", 
         "T3"}]}], ")"}]}]}], "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.5721958956934247`*^9, 3.572195914179482*^9}, {
  3.5721964268588057`*^9, 3.572196453895352*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemVariables", " ", "=", " ", 
   RowBox[{"{", 
    RowBox[{
    "qm1", ",", "dE1", ",", "T0", ",", "qm2", ",", "qm3", ",", "p1", ",", 
     "dE2", ",", "dE3"}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.572018112971751*^9, 3.5720181129797516`*^9}, {
  3.5721960864973383`*^9, 3.572196092515682*^9}, {3.5721962102264147`*^9, 
  3.572196243451315*^9}, {3.57219637238669*^9, 3.572196403913493*^9}}],

Cell[CellGroupData[{

Cell["Boundaries", "Subsection",
 CellChangeTimes->{{3.5721964927835765`*^9, 3.5721964930165896`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemBoundaryEquations", " ", "=", " ", 
   RowBox[{"{", " ", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"p1", " ", "==", 
      RowBox[{"(", 
       RowBox[{"c1", " ", "+", " ", 
        RowBox[{"Zc1", " ", "dE1"}]}], " ", ")"}]}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"p2", " ", "==", 
      RowBox[{"(", 
       RowBox[{"c2", " ", "+", " ", 
        RowBox[{"Zc2", " ", "dE2"}]}], " ", ")"}]}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"p3", " ", "==", 
      RowBox[{"(", 
       RowBox[{"c2", " ", "+", " ", 
        RowBox[{"Zc3", " ", "dE3"}]}], " ", ")"}]}]}], "\[IndentingNewLine]", 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535370830684037*^9, 3.535370830684037*^9}, {
  3.572017824436248*^9, 3.5720178479275913`*^9}, {3.5721960272019463`*^9, 
  3.57219604964723*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["systemVariables"], "Input",
 CellChangeTimes->{{3.516358997828125*^9, 3.51635900259375*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"q1", " ", "rhofuel"}], ",", "dE1", ",", "T0", ",", "qm2", ",", 
   "qm3", ",", "p1", ",", "dE2", ",", "dE3"}], "}"}]], "Output",
 CellChangeTimes->{
  3.516362632921875*^9, 3.5353724958770447`*^9, 3.5353963570625*^9, 
   3.535527574*^9, 3.535527627859375*^9, {3.53552788959375*^9, 
   3.5355279191875*^9}, 3.53552802840625*^9, 3.53552873065625*^9, 
   3.53554112640625*^9, 3.568446783804931*^9, 3.5684494977962046`*^9, 
   3.5684505279102325`*^9, 3.5684505842968707`*^9, 3.56845068769621*^9, 
   3.568451034486059*^9, 3.5684510661750593`*^9, 3.5684512054890594`*^9, 
   3.5684548617459917`*^9, 3.5684568254373507`*^9, 3.5684569377735834`*^9, 
   3.568457130136818*^9, 3.5684574559158363`*^9, 3.568458844300226*^9, 
   3.568458977089504*^9, 3.5684590581376076`*^9, 3.568462683879178*^9, 
   3.568521333518715*^9, 3.568522191641415*^9, 3.5685223117574153`*^9, 
   3.568524359115646*^9, 3.568524499516646*^9, 3.571999398233718*^9, 
   3.572000370798726*^9, 3.572000500528046*^9, 3.572000556255509*^9, 
   3.5720007104945955`*^9, 3.572001089066906*^9, 3.5720011246975346`*^9, 
   3.5720012037977276`*^9, 3.572003901064234*^9, 3.572005062651542*^9, 
   3.5720086376607075`*^9, 3.572009249417877*^9, 3.572161673640643*^9, 
   3.572167676982955*^9, 3.572196523423329*^9, {3.575776916140771*^9, 
   3.5757769385594597`*^9}, {3.5757770250337086`*^9, 3.575777032012228*^9}, 
   3.5757998748229*^9, 3.5774506293289824`*^9, 3.577450662427292*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "ivar"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(q1\\\\ rhofuel\\)\[NoBreak] is not a valid \
variable. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/ivar\\\", ButtonNote -> \
\\\"General::ivar\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, 3.5721965234993334`*^9, {
   3.575776916187607*^9, 3.575776938606295*^9}, {3.5757770250805445`*^9, 
   3.575777032059064*^9}, 3.5757998749098997`*^9, 3.577450629447994*^9, 
   3.5774506624702964`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "ivar"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(q1\\\\ rhofuel\\)\[NoBreak] is not a valid \
variable. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/ivar\\\", ButtonNote -> \
\\\"General::ivar\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, 3.5721965234993334`*^9, {
   3.575776916187607*^9, 3.575776938606295*^9}, {3.5757770250805445`*^9, 
   3.575777032059064*^9}, 3.5757998749098997`*^9, 3.577450629447994*^9, 
   3.5774506624732966`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "ivar"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(q1\\\\ rhofuel\\)\[NoBreak] is not a valid \
variable. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/ivar\\\", ButtonNote -> \
\\\"General::ivar\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, 3.5721965234993334`*^9, {
   3.575776916187607*^9, 3.575776938606295*^9}, {3.5757770250805445`*^9, 
   3.575777032059064*^9}, 3.5757998749098997`*^9, 3.577450629447994*^9, 
   3.5774506624742966`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(General \
:: ivar\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, 3.5721965234993334`*^9, {
   3.575776916187607*^9, 3.575776938606295*^9}, {3.5757770250805445`*^9, 
   3.575777032059064*^9}, 3.5757998749098997`*^9, 3.577450629447994*^9, 
   3.577450662476297*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\\"typename\\\" \[Rule] \\\"PneumaticTconnection\\\"\\)\\), \\(\
\\(\\\"displayname\\\" \[Rule] \\\"PneumaticTconnection\\\"\\)\\)}\\)\\), \\(\
\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \[Rule] \
\\\"PneumaticTconnection.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \[Rule] \\\
\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \\\"PneumaticTconnection.svg\\\
\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \\(\\(\
\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\
\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"hopsanobjectappearance\\\", \
\\(\\({\\(\\(\\\"\\\" \[Ellipsis] \\\"\\\"\\)\\) \[Rule] \\(\\(\\\"\\\" \
\[Ellipsis] \\\"\\\"\\)\\)}\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"modelobject\\\", \\(\\({\\(\\(\\\"typename\\\" \
\[Rule] \\\"PneumaticTconnection\\\"\\)\\), \\(\\(\\\"displayname\\\" \[Rule] \
\\(\\(\\\"\\\" \[Ellipsis] \\\"\\\"\\)\\)\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"PneumaticTconnection.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"PneumaticTconnection.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \\(\\({\\(\
\[LeftSkeleton] 1 \[RightSkeleton]\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)\
\\)\\)]\\)\[NoBreak] is not a list of contents. The third item in an \
XMLElement must be a list of contents, even if it is an empty list. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, 3.5721965234993334`*^9, {
   3.575776916187607*^9, 3.575776938606295*^9}, {3.5757770250805445`*^9, 
   3.575777032059064*^9}, 3.5757998749098997`*^9, 3.577450629447994*^9, 
   3.577450662497299*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, 3.5721965234993334`*^9, {
   3.575776916187607*^9, 3.575776938606295*^9}, {3.5757770250805445`*^9, 
   3.575777032059064*^9}, 3.5757998749098997`*^9, 3.577450629447994*^9, 
   3.577450662498299*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.25`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"y\\\" \[Rule] 0.25`\\)\[NoBreak] is not a valid value for \
an attribute in an XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, 3.5721965234993334`*^9, {
   3.575776916187607*^9, 3.575776938606295*^9}, {3.5757770250805445`*^9, 
   3.575777032059064*^9}, 3.5757998749098997`*^9, 3.577450629447994*^9, 
   3.5774506625002995`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, 3.5721965234993334`*^9, {
   3.575776916187607*^9, 3.575776938606295*^9}, {3.5757770250805445`*^9, 
   3.575777032059064*^9}, 3.5757998749098997`*^9, 3.577450629447994*^9, 
   3.5774506625012994`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.5`\\)\[NoBreak] in \[NoBreak]\\!\\(\\\"y\
\\\" \[Rule] 0.5`\\)\[NoBreak] is not a valid value for an attribute in an \
XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, 3.5721965234993334`*^9, {
   3.575776916187607*^9, 3.575776938606295*^9}, {3.5757770250805445`*^9, 
   3.575777032059064*^9}, 3.5757998749098997`*^9, 3.577450629447994*^9, 
   3.5774506625042996`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, 3.5721965234993334`*^9, {
   3.575776916187607*^9, 3.575776938606295*^9}, {3.5757770250805445`*^9, 
   3.575777032059064*^9}, 3.5757998749098997`*^9, 3.577450629447994*^9, 
   3.5774506625052996`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, 3.5721965234993334`*^9, {
   3.575776916187607*^9, 3.575776938606295*^9}, {3.5757770250805445`*^9, 
   3.575777032059064*^9}, 3.5757998749098997`*^9, 3.577450629447994*^9, 
   3.5774506625073*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.75`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"y\\\" \[Rule] 0.75`\\)\[NoBreak] is not a valid value for \
an attribute in an XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, 3.5721965234993334`*^9, {
   3.575776916187607*^9, 3.575776938606295*^9}, {3.5757770250805445`*^9, 
   3.575777032059064*^9}, 3.5757998749098997`*^9, 3.577450629447994*^9, 
   3.5774506625093*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \
\[NoBreak]\\!\\(\\*StyleBox[\\(XMLElement :: attrhs\\), \
\\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this calculation. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \
ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.5721616737826576`*^9, 3.5721676771339703`*^9, 3.5721965234993334`*^9, {
   3.575776916187607*^9, 3.575776938606295*^9}, {3.5757770250805445`*^9, 
   3.575777032059064*^9}, 3.5757998749098997`*^9, 3.577450629447994*^9, 
   3.5774506625103006`*^9}],

Cell[BoxData["\<\"PneumaticTconnection.xml\"\>"], "Output",
 CellChangeTimes->{{3.516357545078125*^9, 3.516357564140625*^9}, {
   3.516357770609375*^9, 3.516357785859375*^9}, 3.5163578186875*^9, 
   3.51635848075*^9, 3.51635857378125*^9, 3.51635862859375*^9, 
   3.516359047640625*^9, 3.51636233865625*^9, 3.516362633109375*^9, 
   3.5353725030126877`*^9, 3.535396357890625*^9, 3.53552757490625*^9, 
   3.535527628671875*^9, {3.535527890390625*^9, 3.535527920171875*^9}, 
   3.5355280291875*^9, 3.535528731453125*^9, 3.53554112721875*^9, 
   3.568446783942931*^9, 3.5684494980032463`*^9, 3.5684505281202536`*^9, 
   3.568450584596901*^9, 3.568450687890229*^9, 3.568451034686059*^9, 
   3.568451066415059*^9, 3.5684512056800594`*^9, 3.5684548619330106`*^9, 
   3.568456825756383*^9, 3.568456937921598*^9, 3.56845713066087*^9, 
   3.568457456232836*^9, 3.5684588444722433`*^9, 3.5684589774155364`*^9, 
   3.568459058409635*^9, 3.5684626840421944`*^9, 3.5685213338237457`*^9, 
   3.5685221919124155`*^9, 3.568522311929415*^9, 3.568524359283646*^9, 
   3.568524499665646*^9, 3.571999398436536*^9, 3.572000370985927*^9, 
   3.572000500699647*^9, 3.5720005565051107`*^9, 3.572000710619396*^9, 
   3.572001089207307*^9, 3.5720011248223352`*^9, 3.5720012039225283`*^9, 
   3.572003901235835*^9, 3.5720050628075433`*^9, 3.572008638573799*^9, 
   3.572009249556891*^9, 3.572161673789658*^9, 3.572167677139971*^9, 
   3.572196523522334*^9, {3.5757769162344427`*^9, 3.575776938668743*^9}, {
   3.5757770251117687`*^9, 3.5757770320902877`*^9}, 3.5757998749438996`*^9, 
   3.5774506294649963`*^9, 3.5774506625123005`*^9}]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell["Q source", "Section",
 CellChangeTimes->{{3.5353721107611704`*^9, 3.535372120799944*^9}, {
  3.5353722376743703`*^9, 3.5353722411871605`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Pneumatic\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<Qsrc\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Pneumatic massflow source\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentQ\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFilenames", "[", 
   RowBox[{"defaultPath", ",", "domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.53537005401182*^9, 3.5353700749665146`*^9}, {
   3.535370954755151*^9, 3.53537097709949*^9}, 3.575776811203575*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputVariables", "  ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "qminput", ",", "0.", ",", "double", ",", "\"\<kg/s\>\"", ",", 
       "\"\<mass flow rate\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Tinput", ",", "273", ",", "double", ",", "\"\<K\>\"", ",", 
       "\"\<Temperature\>\""}], "}"}]}], "\n", "\t\t\t", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.535371007700482*^9, 3.535371034248669*^9}, {
   3.535371190088558*^9, 3.5353711904943504`*^9}, {3.5353712350534773`*^9, 
   3.5353712648948264`*^9}, {3.5353717647045794`*^9, 3.535371770713621*^9}, {
   3.5355288628125*^9, 3.535528880703125*^9}, 3.5684491375070114`*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{
     "cv", ",", "718", ",", "double", ",", "\"\<\>\"", ",", 
      "\"\<heatcoeff)\>\""}], "}"}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.5353712209599953`*^9, 3.5353712312452717`*^9}, {
  3.535371273276*^9, 3.5353713026504517`*^9}, {3.5353717750057936`*^9, 
  3.5353717773781943`*^9}, {3.535528754359375*^9, 3.5355287555*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"portConnections", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"PneumaticQports", "[", 
     RowBox[{"p1", ",", 
      RowBox[{"1.", "*", 
       RowBox[{"10", "^", "5"}]}], ",", "\"\<fluid port 1\>\"", ",", 
      RowBox[{"{", 
       RowBox[{"0", ",", "0.5", ",", "270"}], "}"}]}], "]"}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535371324617521*^9, 3.5353713328141885`*^9}, {
   3.5353714053976307`*^9, 3.5353715232422905`*^9}, 3.535371590017808*^9, {
   3.5353717800159297`*^9, 3.535371782232251*^9}, {3.5355422150625*^9, 
   3.53554221625*^9}, 3.53554234034375*^9, 3.568450184110051*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"nodeConnections", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"PneumaticQnode", "[", 
     RowBox[{"p1", ",", 
      RowBox[{"1.", "*", 
       RowBox[{"10", "^", "5"}]}], ",", "\"\<fluid port 1\>\""}], "]"}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535371324617521*^9, 3.5353713328141885`*^9}, {
   3.5353714053976307`*^9, 3.5353715232422905`*^9}, 3.535371590017808*^9, {
   3.5353717800159297`*^9, 3.535371782232251*^9}, {3.5355422150625*^9, 
   3.53554221625*^9}, 3.53554234034375*^9, 3.568450184110051*^9, {
   3.568450899862424*^9, 3.5684509048379216`*^9}, {3.5684511835670595`*^9, 
   3.568451184563059*^9}}],

Cell["\<\
qmp1 = qp1;
qmp2 = qp2;\
\>", "Text",
 CellChangeTimes->{{3.5685212396426315`*^9, 3.56852125718814*^9}, 
   3.5720004884379687`*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"expressions", " ", "=", " ", 
    RowBox[{"{", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"qmp1", "==", "qminput"}], ",", "\[IndentingNewLine]", 
      RowBox[{"dEp1", "==", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"onPositive", "[", "qmp1", "]"}], " ", "qmp1", " ", "cv", 
          " ", "Tinput"}], " ", "+", " ", 
         RowBox[{
          RowBox[{"onNegative", "[", "qmp1", "]"}], " ", "qmp1", " ", "cv", 
          " ", "Tp1"}]}], ")"}]}], ",", "\[IndentingNewLine]", 
      RowBox[{"pp1", "==", 
       RowBox[{"cp1", "+", 
        RowBox[{"Zcp1", " ", "dEp1"}]}]}]}], "\[IndentingNewLine]", "}"}]}], 
   ";"}], "\[IndentingNewLine]"}]], "Input",
 CellChangeTimes->{{3.535371567816549*^9, 3.535371567816549*^9}, {
   3.5353716426535892`*^9, 3.535371682486434*^9}, {3.535371746115571*^9, 
   3.5353717489874244`*^9}, {3.535372174522212*^9, 3.535372190415635*^9}, {
   3.535390699328125*^9, 3.53539070134375*^9}, {3.53552880996875*^9, 
   3.535528833296875*^9}, {3.535528870453125*^9, 3.535528889296875*^9}, 
   3.568449167176839*^9, {3.56845017360495*^9, 3.5684501751082506`*^9}, {
   3.568455188046043*^9, 3.568455190255043*^9}, {3.5684575104378357`*^9, 
   3.568457521658836*^9}, 3.5684590491017046`*^9, {3.5685305001140714`*^9, 
   3.568530500690071*^9}, {3.5720182491175385`*^9, 3.5720182632683477`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\(\\(\\\"\\\" \[Ellipsis] \\\"e\\\"\\)\\) \[Rule] \
\\(\\(\\\"\\\" \[Ellipsis] \\\"\\\"\\)\\)\\)\\), \\(\\(\[LeftSkeleton] 1 \
\[RightSkeleton]\\)\\)}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \
\\(\\({\\(\\(\\\"isopath\\\" \[Rule] \\\"PneumaticQsrc.svg\\\"\\)\\), \
\\(\\(\\\"iconrotation\\\" \[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \
\[Rule] \\\"PneumaticQsrc.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] 0.5`\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Pp1\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\[LeftSkeleton] 1 \
\[RightSkeleton]\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"hopsanobjectappearance\\\", \
\\(\\({\\\"version\\\" \[Rule] \\\"0.1\\\"}\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"modelobject\\\", \\(\\({\\(\\(\\\"typename\\\" \
\[Rule] \\\"PneumaticQsrc\\\"\\)\\), \\(\\(\\\"displayname\\\" \[Rule] \
\\\"PneumaticQsrc\\\"\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"PneumaticQsrc.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \[Rule] \
\\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \\\"PneumaticQsrc.svg\\\"\\)\
\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(XMLElement[\\(\\(\
\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)\\)\\)]\\)\
\[NoBreak] is not a list of contents. The third item in an XMLElement must be \
a list of contents, even if it is an empty list. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358515625*^9, 3.53554112825*^9, 3.568446784074931*^9, 
   3.568449498182282*^9, 3.5684505282582674`*^9, 3.568450585221963*^9, 
   3.5684506880312433`*^9, 3.568451034841059*^9, 3.5684510666030593`*^9, 
   3.5684512060690594`*^9, 3.5684548620580235`*^9, 3.568456825936401*^9, 
   3.568457456505836*^9, 3.5684588446872644`*^9, 3.5684589780756025`*^9, 
   3.5684590590046945`*^9, 3.5685213344678097`*^9, 3.568522192365415*^9, 
   3.5685223124024153`*^9, 3.571999398764166*^9, 3.5720003710951276`*^9, 
   3.57200050107405*^9, 3.5720005566299114`*^9, 3.572003901391836*^9, 
   3.572005062979144*^9, 3.5720086389258337`*^9, 3.572009249715907*^9, 
   3.5721616738736663`*^9, 3.5721676773419905`*^9, {3.575776916328114*^9, 
   3.5757769387468023`*^9}, {3.5757770252210517`*^9, 3.5757770321995707`*^9}, 
   3.5757998750589*^9, 3.57745063000605*^9, 3.577450662966346*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358515625*^9, 3.53554112825*^9, 3.568446784074931*^9, 
   3.568449498182282*^9, 3.5684505282582674`*^9, 3.568450585221963*^9, 
   3.5684506880312433`*^9, 3.568451034841059*^9, 3.5684510666030593`*^9, 
   3.5684512060690594`*^9, 3.5684548620580235`*^9, 3.568456825936401*^9, 
   3.568457456505836*^9, 3.5684588446872644`*^9, 3.5684589780756025`*^9, 
   3.5684590590046945`*^9, 3.5685213344678097`*^9, 3.568522192365415*^9, 
   3.5685223124024153`*^9, 3.571999398764166*^9, 3.5720003710951276`*^9, 
   3.57200050107405*^9, 3.5720005566299114`*^9, 3.572003901391836*^9, 
   3.572005062979144*^9, 3.5720086389258337`*^9, 3.572009249715907*^9, 
   3.5721616738736663`*^9, 3.5721676773419905`*^9, {3.575776916328114*^9, 
   3.5757769387468023`*^9}, {3.5757770252210517`*^9, 3.5757770321995707`*^9}, 
   3.5757998750589*^9, 3.57745063000605*^9, 3.577450662969346*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.5`\\)\[NoBreak] in \[NoBreak]\\!\\(\\\"y\
\\\" \[Rule] 0.5`\\)\[NoBreak] is not a valid value for an attribute in an \
XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358515625*^9, 3.53554112825*^9, 3.568446784074931*^9, 
   3.568449498182282*^9, 3.5684505282582674`*^9, 3.568450585221963*^9, 
   3.5684506880312433`*^9, 3.568451034841059*^9, 3.5684510666030593`*^9, 
   3.5684512060690594`*^9, 3.5684548620580235`*^9, 3.568456825936401*^9, 
   3.568457456505836*^9, 3.5684588446872644`*^9, 3.5684589780756025`*^9, 
   3.5684590590046945`*^9, 3.5685213344678097`*^9, 3.568522192365415*^9, 
   3.5685223124024153`*^9, 3.571999398764166*^9, 3.5720003710951276`*^9, 
   3.57200050107405*^9, 3.5720005566299114`*^9, 3.572003901391836*^9, 
   3.572005062979144*^9, 3.5720086389258337`*^9, 3.572009249715907*^9, 
   3.5721616738736663`*^9, 3.5721676773419905`*^9, {3.575776916328114*^9, 
   3.5757769387468023`*^9}, {3.5757770252210517`*^9, 3.5757770321995707`*^9}, 
   3.5757998750589*^9, 3.57745063000605*^9, 3.5774506629703465`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358515625*^9, 3.53554112825*^9, 3.568446784074931*^9, 
   3.568449498182282*^9, 3.5684505282582674`*^9, 3.568450585221963*^9, 
   3.5684506880312433`*^9, 3.568451034841059*^9, 3.5684510666030593`*^9, 
   3.5684512060690594`*^9, 3.5684548620580235`*^9, 3.568456825936401*^9, 
   3.568457456505836*^9, 3.5684588446872644`*^9, 3.5684589780756025`*^9, 
   3.5684590590046945`*^9, 3.5685213344678097`*^9, 3.568522192365415*^9, 
   3.5685223124024153`*^9, 3.571999398764166*^9, 3.5720003710951276`*^9, 
   3.57200050107405*^9, 3.5720005566299114`*^9, 3.572003901391836*^9, 
   3.572005062979144*^9, 3.5720086389258337`*^9, 3.572009249715907*^9, 
   3.5721616738736663`*^9, 3.5721676773419905`*^9, {3.575776916328114*^9, 
   3.5757769387468023`*^9}, {3.5757770252210517`*^9, 3.5757770321995707`*^9}, 
   3.5757998750589*^9, 3.57745063000605*^9, 3.5774506629723463`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.3333333333333333`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.3333333333333333`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358515625*^9, 3.53554112825*^9, 3.568446784074931*^9, 
   3.568449498182282*^9, 3.5684505282582674`*^9, 3.568450585221963*^9, 
   3.5684506880312433`*^9, 3.568451034841059*^9, 3.5684510666030593`*^9, 
   3.5684512060690594`*^9, 3.5684548620580235`*^9, 3.568456825936401*^9, 
   3.568457456505836*^9, 3.5684588446872644`*^9, 3.5684589780756025`*^9, 
   3.5684590590046945`*^9, 3.5685213344678097`*^9, 3.568522192365415*^9, 
   3.5685223124024153`*^9, 3.571999398764166*^9, 3.5720003710951276`*^9, 
   3.57200050107405*^9, 3.5720005566299114`*^9, 3.572003901391836*^9, 
   3.572005062979144*^9, 3.5720086389258337`*^9, 3.572009249715907*^9, 
   3.5721616738736663`*^9, 3.5721676773419905`*^9, {3.575776916328114*^9, 
   3.5757769387468023`*^9}, {3.5757770252210517`*^9, 3.5757770321995707`*^9}, 
   3.5757998750589*^9, 3.57745063000605*^9, 3.5774506629733467`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358515625*^9, 3.53554112825*^9, 3.568446784074931*^9, 
   3.568449498182282*^9, 3.5684505282582674`*^9, 3.568450585221963*^9, 
   3.5684506880312433`*^9, 3.568451034841059*^9, 3.5684510666030593`*^9, 
   3.5684512060690594`*^9, 3.5684548620580235`*^9, 3.568456825936401*^9, 
   3.568457456505836*^9, 3.5684588446872644`*^9, 3.5684589780756025`*^9, 
   3.5684590590046945`*^9, 3.5685213344678097`*^9, 3.568522192365415*^9, 
   3.5685223124024153`*^9, 3.571999398764166*^9, 3.5720003710951276`*^9, 
   3.57200050107405*^9, 3.5720005566299114`*^9, 3.572003901391836*^9, 
   3.572005062979144*^9, 3.5720086389258337`*^9, 3.572009249715907*^9, 
   3.5721616738736663`*^9, 3.5721676773419905`*^9, {3.575776916328114*^9, 
   3.5757769387468023`*^9}, {3.5757770252210517`*^9, 3.5757770321995707`*^9}, 
   3.5757998750589*^9, 3.57745063000605*^9, 3.577450662974347*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358515625*^9, 3.53554112825*^9, 3.568446784074931*^9, 
   3.568449498182282*^9, 3.5684505282582674`*^9, 3.568450585221963*^9, 
   3.5684506880312433`*^9, 3.568451034841059*^9, 3.5684510666030593`*^9, 
   3.5684512060690594`*^9, 3.5684548620580235`*^9, 3.568456825936401*^9, 
   3.568457456505836*^9, 3.5684588446872644`*^9, 3.5684589780756025`*^9, 
   3.5684590590046945`*^9, 3.5685213344678097`*^9, 3.568522192365415*^9, 
   3.5685223124024153`*^9, 3.571999398764166*^9, 3.5720003710951276`*^9, 
   3.57200050107405*^9, 3.5720005566299114`*^9, 3.572003901391836*^9, 
   3.572005062979144*^9, 3.5720086389258337`*^9, 3.572009249715907*^9, 
   3.5721616738736663`*^9, 3.5721676773419905`*^9, {3.575776916328114*^9, 
   3.5757769387468023`*^9}, {3.5757770252210517`*^9, 3.5757770321995707`*^9}, 
   3.5757998750589*^9, 3.57745063000605*^9, 3.5774506629753466`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.6666666666666666`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.6666666666666666`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358515625*^9, 3.53554112825*^9, 3.568446784074931*^9, 
   3.568449498182282*^9, 3.5684505282582674`*^9, 3.568450585221963*^9, 
   3.5684506880312433`*^9, 3.568451034841059*^9, 3.5684510666030593`*^9, 
   3.5684512060690594`*^9, 3.5684548620580235`*^9, 3.568456825936401*^9, 
   3.568457456505836*^9, 3.5684588446872644`*^9, 3.5684589780756025`*^9, 
   3.5684590590046945`*^9, 3.5685213344678097`*^9, 3.568522192365415*^9, 
   3.5685223124024153`*^9, 3.571999398764166*^9, 3.5720003710951276`*^9, 
   3.57200050107405*^9, 3.5720005566299114`*^9, 3.572003901391836*^9, 
   3.572005062979144*^9, 3.5720086389258337`*^9, 3.572009249715907*^9, 
   3.5721616738736663`*^9, 3.5721676773419905`*^9, {3.575776916328114*^9, 
   3.5757769387468023`*^9}, {3.5757770252210517`*^9, 3.5757770321995707`*^9}, 
   3.5757998750589*^9, 3.57745063000605*^9, 3.577450662976347*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \
\[NoBreak]\\!\\(\\*StyleBox[\\(XMLElement :: attrhs\\), \
\\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this calculation. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \
ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358515625*^9, 3.53554112825*^9, 3.568446784074931*^9, 
   3.568449498182282*^9, 3.5684505282582674`*^9, 3.568450585221963*^9, 
   3.5684506880312433`*^9, 3.568451034841059*^9, 3.5684510666030593`*^9, 
   3.5684512060690594`*^9, 3.5684548620580235`*^9, 3.568456825936401*^9, 
   3.568457456505836*^9, 3.5684588446872644`*^9, 3.5684589780756025`*^9, 
   3.5684590590046945`*^9, 3.5685213344678097`*^9, 3.568522192365415*^9, 
   3.5685223124024153`*^9, 3.571999398764166*^9, 3.5720003710951276`*^9, 
   3.57200050107405*^9, 3.5720005566299114`*^9, 3.572003901391836*^9, 
   3.572005062979144*^9, 3.5720086389258337`*^9, 3.572009249715907*^9, 
   3.5721616738736663`*^9, 3.5721676773419905`*^9, {3.575776916328114*^9, 
   3.5757769387468023`*^9}, {3.5757770252210517`*^9, 3.5757770321995707`*^9}, 
   3.5757998750589*^9, 3.57745063000605*^9, 3.577450662977347*^9}],

Cell[BoxData["\<\"PneumaticQsrc.xml\"\>"], "Output",
 CellChangeTimes->{
  3.5353963586875*^9, 3.535541128421875*^9, 3.5684467840829315`*^9, 
   3.568449498201286*^9, 3.5684505282732687`*^9, 3.5684505852339644`*^9, 
   3.5684506880652466`*^9, 3.5684510348530593`*^9, 3.568451066620059*^9, 
   3.5684512061290593`*^9, 3.568454862076025*^9, 3.568456825990406*^9, 
   3.568457456549836*^9, 3.568458844746271*^9, 3.5684589780886035`*^9, 
   3.5684590590416985`*^9, 3.5685213344858117`*^9, 3.568522192383415*^9, 
   3.568522312453415*^9, 3.571999398764166*^9, 3.572000371110728*^9, 
   3.57200050110525*^9, 3.5720005566455116`*^9, 3.5720039014074364`*^9, 
   3.5720050629947443`*^9, 3.5720086389398355`*^9, 3.5720092497309084`*^9, 
   3.572161673881667*^9, 3.5721676773489914`*^9, {3.5757769163437257`*^9, 
   3.575776938762414*^9}, {3.5757770252210517`*^9, 3.5757770321995707`*^9}, 
   3.5757998750729*^9, 3.577450630018051*^9, 3.5774506629783473`*^9}]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell["PT source", "Section"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Pneumatic\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<PTsrc\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Pneumatic pressure and temperature source\>\""}],
   ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentC\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFilenames", "[", 
   RowBox[{"defaultPath", ",", "domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.53537005401182*^9, 3.5353700749665146`*^9}, {
   3.535370954755151*^9, 3.53537097709949*^9}, {3.535371806611791*^9, 
   3.5353718188171687`*^9}, {3.568460231845629*^9, 3.5684602322386293`*^9}, 
   3.568460507404629*^9, 3.568461908210619*^9, 3.568462043263123*^9, 
   3.5684621491307087`*^9, 3.568462308536648*^9, 3.5757768121871243`*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputVariables", "  ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"pinput", ",", 
       RowBox[{"1", "*", 
        RowBox[{"10", "^", "5"}]}], ",", "double", ",", "\"\<Pa\>\"", ",", 
       "\"\<Input Pressure\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Tinput", ",", "273.", ",", "double", ",", "\"\<K\>\"", ",", 
       "\"\<Input Temperature\>\""}], "}"}]}], "\n", "\t\t\t", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.535371843727377*^9, 3.5353719312408724`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"nodeConnections", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"PneumaticCnode", "[", 
     RowBox[{"p1", ",", 
      RowBox[{"1.", "*", 
       RowBox[{"10", "^", "5"}]}], ",", "\"\<fluid port 1\>\""}], "]"}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535371324617521*^9, 3.5353713328141885`*^9}, {
   3.5353714053976307`*^9, 3.5353715232422905`*^9}, 3.535371590017808*^9, {
   3.5353717800159297`*^9, 3.535371782232251*^9}, 3.5353719570563393`*^9, {
   3.535542225*^9, 3.5355422264375*^9}, 3.5355423471875*^9, {
   3.5684501591780653`*^9, 3.5684501598331966`*^9}, {3.5684509147119093`*^9, 
   3.568450921142552*^9}, {3.568451191946059*^9, 3.5684511930270596`*^9}, 
   3.5684619057773757`*^9, {3.5684620390697036`*^9, 3.568462052820079*^9}, 
   3.56846215194499*^9}],

Cell["\<\
qmp1 = qp1;
qmp2 = qp2;\
\>", "Text",
 CellChangeTimes->{{3.5685212396426315`*^9, 3.56852125718814*^9}, 
   3.572000493024398*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"expressions", " ", "=", " ", 
   RowBox[{"{", "\n", "\t\t", 
    RowBox[{
     RowBox[{"cp1", "==", "pinput"}], ",", "\n", "\t\t", 
     RowBox[{"Tp1", "==", "Tinput"}], ",", "\n", "\t\t", 
     RowBox[{"Zcp1", "==", " ", "0."}]}], "\n", "\t\t\t", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{
  3.535371985774875*^9, {3.568450005757387*^9, 3.568450065837401*^9}, {
   3.5684501624737244`*^9, 3.568450164132056*^9}, {3.5720182209909296`*^9, 
   3.572018240371038*^9}}],

Cell[CellGroupData[{

Cell[BoxData["ka"], "Input",
 CellChangeTimes->{{3.568522304317415*^9, 3.5685223044154153`*^9}}],

Cell[BoxData["ka"], "Output",
 CellChangeTimes->{
  3.568522312550415*^9, 3.5719988028813744`*^9, 3.571999398904578*^9, 
   3.5720003714227295`*^9, 3.5720005011832504`*^9, 3.5720005569731135`*^9, 
   3.5720039014698367`*^9, 3.5720050636187487`*^9, 3.5720086390138426`*^9, 
   3.5720092497959146`*^9, 3.5721616739446735`*^9, 3.5721676774069977`*^9, {
   3.5757769164061737`*^9, 3.5757769388248615`*^9}, {3.5757770252834992`*^9, 
   3.5757770322776303`*^9}, 3.5757998751378994`*^9, 3.577450630182068*^9, 
   3.5774506630473537`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"PneumaticPTsrc.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \[Rule] \
\\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"PneumaticPTsrc.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] 0.5`\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Pp1\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(\\(\\(\[LeftSkeleton] 10 \
\[RightSkeleton]\\)\\)[\\(\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\[LeftSkeleton] 1 \
\[RightSkeleton]\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"hopsanobjectappearance\\\", \
\\(\\({\\(\\(\\\"v\\\" \[Ellipsis] \\\"on\\\"\\)\\) \[Rule] \\(\\(\\\"\\\" \
\[Ellipsis] \\\"\\\"\\)\\)}\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"modelobject\\\", \\(\\({\\(\\(\\\"typename\\\" \
\[Rule] \\\"PneumaticPTsrc\\\"\\)\\), \\(\\(\\\"displayname\\\" \[Rule] \
\\\"PneumaticPTsrc\\\"\\)\\)}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\
\", \\(\\({\\(\\(\\\"isopath\\\" \[Rule] \\\"PneumaticPTsrc.svg\\\"\\)\\), \
\\(\\(\\\"iconrotation\\\" \[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \
\[Rule] \\\"PneumaticPTsrc.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \\(\\({\\(\
\[LeftSkeleton] 1 \[RightSkeleton]\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)\
\\)\\)]\\)\[NoBreak] is not a list of contents. The third item in an \
XMLElement must be a list of contents, even if it is an empty list. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.575776916453009*^9, 3.575776938856086*^9}, {3.5757770253303347`*^9, 
   3.575777032308854*^9}, 3.5757998751778994`*^9, 3.577450630280078*^9, 
   3.5774506630813575`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.575776916453009*^9, 3.575776938856086*^9}, {3.5757770253303347`*^9, 
   3.575777032308854*^9}, 3.5757998751778994`*^9, 3.577450630280078*^9, 
   3.577450663083358*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.5`\\)\[NoBreak] in \[NoBreak]\\!\\(\\\"y\
\\\" \[Rule] 0.5`\\)\[NoBreak] is not a valid value for an attribute in an \
XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.575776916453009*^9, 3.575776938856086*^9}, {3.5757770253303347`*^9, 
   3.575777032308854*^9}, 3.5757998751778994`*^9, 3.577450630280078*^9, 
   3.5774506630853577`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.575776916453009*^9, 3.575776938856086*^9}, {3.5757770253303347`*^9, 
   3.575777032308854*^9}, 3.5757998751778994`*^9, 3.577450630280078*^9, 
   3.577450663086358*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.3333333333333333`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.3333333333333333`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.575776916453009*^9, 3.575776938856086*^9}, {3.5757770253303347`*^9, 
   3.575777032308854*^9}, 3.5757998751778994`*^9, 3.577450630280078*^9, 
   3.577450663087358*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Malformed symbolic XML expression encountered. This may \
result in unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.575776916453009*^9, 3.575776938856086*^9}, {3.5757770253303347`*^9, 
   3.575777032308854*^9}, 3.5757998751778994`*^9, 3.577450630280078*^9, 
   3.577450663088358*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \[NoBreak]\\!\\(\\*StyleBox[\\(Export :: \
autofix\\), \\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this \
calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \
\\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.575776916453009*^9, 3.575776938856086*^9}, {3.5757770253303347`*^9, 
   3.575777032308854*^9}, 3.5757998751778994`*^9, 3.577450630280078*^9, 
   3.5774506630893583`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(0.6666666666666666`\\)\[NoBreak] in \
\[NoBreak]\\!\\(\\\"x\\\" \[Rule] 0.6666666666666666`\\)\[NoBreak] is not a \
valid value for an attribute in an XMLElement. The value of the attribute \
must be a string. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.575776916453009*^9, 3.575776938856086*^9}, {3.5757770253303347`*^9, 
   3.575777032308854*^9}, 3.5757998751778994`*^9, 3.577450630280078*^9, 
   3.5774506630903587`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"General", "::", "stop"}], "MessageName"], 
  RowBox[{
  ":", " "}], "\<\"Further output of \
\[NoBreak]\\!\\(\\*StyleBox[\\(XMLElement :: attrhs\\), \
\\\"MessageName\\\"]\\)\[NoBreak] will be suppressed during this calculation. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \
ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.575776916453009*^9, 3.575776938856086*^9}, {3.5757770253303347`*^9, 
   3.575777032308854*^9}, 3.5757998751778994`*^9, 3.577450630280078*^9, 
   3.577450663091358*^9}],

Cell[BoxData["\<\"PneumaticPTsrc.xml\"\>"], "Output",
 CellChangeTimes->{
  3.535396359046875*^9, 3.5355411295625*^9, 3.568446784220931*^9, 
   3.5684494985493555`*^9, 3.5684505284942913`*^9, 3.5684505853929806`*^9, 
   3.568450688449285*^9, 3.568451035177059*^9, 3.568451066763059*^9, 
   3.568451206252059*^9, 3.568454862469064*^9, 3.5684568264944563`*^9, 
   3.568457457223836*^9, 3.568458845471343*^9, 3.56845897834863*^9, 
   3.5684590592547197`*^9, 3.5684601460486293`*^9, 3.5684602402226295`*^9, 
   3.5684605120096292`*^9, 3.568461911240922*^9, 3.568462056024399*^9, 
   3.56846215564436*^9, 3.5685213346798315`*^9, 3.5685221925184155`*^9, 
   3.568522312646415*^9, 3.5719988029437747`*^9, 3.571999398966984*^9, 
   3.57200037146953*^9, 3.5720005012612505`*^9, 3.572000557035514*^9, 
   3.5720039015478373`*^9, 3.5720050636811485`*^9, 3.572008639074849*^9, 
   3.57200924984692*^9, 3.5721616740016794`*^9, 3.572167677495006*^9, {
   3.5757769164686213`*^9, 3.5757769388716974`*^9}, {3.5757770253303347`*^9, 
   3.5757770323400784`*^9}, 3.5757998751888995`*^9, 3.5774506302980795`*^9, 
   3.577450663091358*^9}]
}, Open  ]]
}, Closed]]
}, Open  ]],

Cell[CellGroupData[{

Cell["\<\
Partial Components for Pneumatic Systems\
\>", "Title",
 CellChangeTimes->{{3.5757769017309875`*^9, 3.575776902917492*^9}}],

Cell[CellGroupData[{

Cell["P sensor", "Section",
 CellChangeTimes->{{3.5721748273855715`*^9, 3.572174828436571*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Pneumatic\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<Psensor\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Pneumatic pressure sensor\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentSignal\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFilenames", "[", 
   RowBox[{"defaultPath", ",", "domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.53537005401182*^9, 3.5353700749665146`*^9}, {
   3.535370954755151*^9, 3.53537097709949*^9}, {3.535371806611791*^9, 
   3.5353718188171687`*^9}, {3.568460231845629*^9, 3.5684602322386293`*^9}, 
   3.568460507404629*^9, 3.568461908210619*^9, 3.568462043263123*^9, 
   3.5684621491307087`*^9, 3.568462308536648*^9, {3.5721748132655716`*^9, 
   3.5721748240935717`*^9}, 3.5721776761776123`*^9, {3.5721779424702387`*^9, 
   3.572177943308323*^9}, 3.575776813108227*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"nodeConnections", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"PneumaticCnode", "[", 
     RowBox[{"p1", ",", 
      RowBox[{"1.", "*", 
       RowBox[{"10", "^", "5"}]}], ",", "\"\<fluid port 1\>\""}], "]"}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535371324617521*^9, 3.5353713328141885`*^9}, {
   3.5353714053976307`*^9, 3.5353715232422905`*^9}, 3.535371590017808*^9, {
   3.5353717800159297`*^9, 3.535371782232251*^9}, 3.5353719570563393`*^9, {
   3.535542225*^9, 3.5355422264375*^9}, 3.5355423471875*^9, {
   3.5684501591780653`*^9, 3.5684501598331966`*^9}, {3.5684509147119093`*^9, 
   3.568450921142552*^9}, {3.568451191946059*^9, 3.5684511930270596`*^9}, 
   3.5684619057773757`*^9, {3.5684620390697036`*^9, 3.568462052820079*^9}, 
   3.56846215194499*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{"psensor", ",", 
      RowBox[{"1.", "*", 
       RowBox[{"10", "^", "5"}]}], ",", "double", ",", "\"\<Pa\>\"", ",", 
      "\"\<Pressure\>\""}], "}"}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.535527741234375*^9, 3.535527744390625*^9}, {
  3.535527776078125*^9, 3.5355278698125*^9}, {3.5720180179783173`*^9, 
  3.5720180202844496`*^9}, {3.572175251718191*^9, 3.5721752893289514`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"expressions", " ", "=", " ", 
   RowBox[{"{", "\n", "\t\t", 
    RowBox[{"psensor", "\[Equal]", "pp1"}], "\n", "\t\t\t", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{
  3.535371985774875*^9, {3.568450005757387*^9, 3.568450065837401*^9}, {
   3.5684501624737244`*^9, 3.568450164132056*^9}, {3.5720182209909296`*^9, 
   3.572018240371038*^9}, {3.572175295046523*^9, 3.5721753029853168`*^9}, {
   3.5721753422562437`*^9, 3.572175368382856*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], ":", 
  " ", "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\\"typename\\\" \[Rule] \\\"PneumaticPsensor\\\"\\)\\), \
\\(\\(\\\"displayname\\\" \[Rule] \\(\\(\\\"P\\\" \[Ellipsis] \
\\\"or\\\"\\)\\)\\)\\)}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \
\\(\\({\\(\\(\\\"isopath\\\" \[Rule] \\\"PneumaticPsensor.svg\\\"\\)\\), \
\\(\\(\\\"iconrotation\\\" \[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \
\[Rule] \\\"PneumaticPsensor.svg\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \
\\(\\({}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\
\\\"x\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] 0.5`\\)\\), \\(\\(\
\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Pp1\\\"\\)\
\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
\\\"0.5\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Ppsensor\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)]\\)\
\[NoBreak] is not a list of contents. The third item in an XMLElement must be \
a list of contents, even if it is an empty list. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.572175361453163*^9, 3.572175370844102*^9}, 3.5721758283538485`*^9, 
   3.5721762627012787`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], ":", 
  " ", "\<\"Malformed symbolic XML expression encountered. This may result in \
unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.572175361453163*^9, 3.572175370844102*^9}, 3.5721758283538485`*^9, 
   3.572176262704279*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], ":", 
  " ", "\<\"\[NoBreak]\\!\\(0.5`\\)\[NoBreak] in \[NoBreak]\\!\\(\\\"y\\\" \
\[Rule] 0.5`\\)\[NoBreak] is not a valid value for an attribute in an \
XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.572175361453163*^9, 3.572175370844102*^9}, 3.5721758283538485`*^9, 
   3.5721762627052794`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], ":", 
  " ", "\<\"Malformed symbolic XML expression encountered. This may result in \
unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.572175361453163*^9, 3.572175370844102*^9}, 3.5721758283538485`*^9, 
   3.5721762627062798`*^9}],

Cell[BoxData["\<\"PneumaticPsensor.xml\"\>"], "Output",
 CellChangeTimes->{
  3.535396359046875*^9, 3.5355411295625*^9, 3.568446784220931*^9, 
   3.5684494985493555`*^9, 3.5684505284942913`*^9, 3.5684505853929806`*^9, 
   3.568450688449285*^9, 3.568451035177059*^9, 3.568451066763059*^9, 
   3.568451206252059*^9, 3.568454862469064*^9, 3.5684568264944563`*^9, 
   3.568457457223836*^9, 3.568458845471343*^9, 3.56845897834863*^9, 
   3.5684590592547197`*^9, 3.5684601460486293`*^9, 3.5684602402226295`*^9, 
   3.5684605120096292`*^9, 3.568461911240922*^9, 3.568462056024399*^9, 
   3.56846215564436*^9, 3.5685213346798315`*^9, 3.5685221925184155`*^9, 
   3.568522312646415*^9, 3.5719988029437747`*^9, 3.571999398966984*^9, 
   3.57200037146953*^9, 3.5720005012612505`*^9, 3.572000557035514*^9, 
   3.5720039015478373`*^9, 3.5720050636811485`*^9, 3.572008639074849*^9, 
   3.57200924984692*^9, 3.5721616740016794`*^9, 3.572167677495006*^9, {
   3.5721753614861665`*^9, 3.572175370850103*^9}, 3.5721758283608494`*^9, 
   3.5721762627072797`*^9}]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell["T sensor", "Section",
 CellChangeTimes->{{3.5721748273855715`*^9, 3.572174828436571*^9}, 
   3.5721778743194246`*^9}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Pneumatic\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<Tsensor\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Pneumatic tempreature sensor\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentSignal\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFilenames", "[", 
   RowBox[{"defaultPath", ",", "domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.53537005401182*^9, 3.5353700749665146`*^9}, {
   3.535370954755151*^9, 3.53537097709949*^9}, {3.535371806611791*^9, 
   3.5353718188171687`*^9}, {3.568460231845629*^9, 3.5684602322386293`*^9}, 
   3.568460507404629*^9, 3.568461908210619*^9, 3.568462043263123*^9, 
   3.5684621491307087`*^9, 3.568462308536648*^9, {3.5721748132655716`*^9, 
   3.5721748240935717`*^9}, 3.5721776761776123`*^9, {3.572177921565149*^9, 
   3.5721779347914715`*^9}, 3.5757768139824934`*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"nodeConnections", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"PneumaticCnode", "[", 
     RowBox[{"p1", ",", 
      RowBox[{"1.", "*", 
       RowBox[{"10", "^", "5"}]}], ",", "\"\<fluid port 1\>\""}], "]"}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535371324617521*^9, 3.5353713328141885`*^9}, {
   3.5353714053976307`*^9, 3.5353715232422905`*^9}, 3.535371590017808*^9, {
   3.5353717800159297`*^9, 3.535371782232251*^9}, 3.5353719570563393`*^9, {
   3.535542225*^9, 3.5355422264375*^9}, 3.5355423471875*^9, {
   3.5684501591780653`*^9, 3.5684501598331966`*^9}, {3.5684509147119093`*^9, 
   3.568450921142552*^9}, {3.568451191946059*^9, 3.5684511930270596`*^9}, 
   3.5684619057773757`*^9, {3.5684620390697036`*^9, 3.568462052820079*^9}, 
   3.56846215194499*^9, {3.572178105443535*^9, 3.57217810649664*^9}, {
   3.5721787913795547`*^9, 3.572178800924555*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{
     "Tsensor", ",", "0.", ",", "double", ",", "\"\<K\>\"", ",", 
      "\"\<Temperature\>\""}], "}"}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.535527741234375*^9, 3.535527744390625*^9}, {
   3.535527776078125*^9, 3.5355278698125*^9}, {3.5720180179783173`*^9, 
   3.5720180202844496`*^9}, {3.572175251718191*^9, 3.5721752893289514`*^9}, {
   3.572177887402733*^9, 3.572177912859278*^9}, {3.572178807901555*^9, 
   3.572178808081555*^9}, 3.572179259646962*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"expressions", " ", "=", " ", 
   RowBox[{"{", "\n", "\t\t", 
    RowBox[{"Tsensor", "\[Equal]", "Tp1"}], "\n", "\t\t\t", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{
  3.535371985774875*^9, {3.568450005757387*^9, 3.568450065837401*^9}, {
   3.5684501624737244`*^9, 3.568450164132056*^9}, {3.5720182209909296`*^9, 
   3.572018240371038*^9}, {3.572175295046523*^9, 3.5721753029853168`*^9}, {
   3.5721753422562437`*^9, 3.572175368382856*^9}, {3.5721778811001024`*^9, 
   3.572177907609753*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], ":", 
  " ", "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\\"typename\\\" \[Rule] \\\"PneumaticTsensor\\\"\\)\\), \
\\(\\(\\(\\(\\\"\\\" \[Ellipsis] \\\"\\\"\\)\\) \[Rule] \\(\\(\[LeftSkeleton] \
18 \[RightSkeleton]\\)\\)\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"PneumaticTsensor.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"PneumaticTsensor.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] 0.5`\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Pp1\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
\\\"0.5\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"PTsensor\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\[NoBreak] in \
\[NoBreak]\\!\\(\[LeftSkeleton] 1 \[RightSkeleton]\\)\[NoBreak] is not a list \
of contents. The third item in an XMLElement must be a list of contents, even \
if it is an empty list. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.572175361453163*^9, 3.572175370844102*^9}, 3.5721758283538485`*^9, 
   3.5721762627012787`*^9, 3.5721781688488746`*^9, 3.572178900148555*^9, 
   3.5721793116761646`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], ":", 
  " ", "\<\"Malformed symbolic XML expression encountered. This may result in \
unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.572175361453163*^9, 3.572175370844102*^9}, 3.5721758283538485`*^9, 
   3.5721762627012787`*^9, 3.5721781688488746`*^9, 3.572178900148555*^9, 
   3.572179311679165*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], ":", 
  " ", "\<\"\[NoBreak]\\!\\(0.5`\\)\[NoBreak] in \[NoBreak]\\!\\(\\\"y\\\" \
\[Rule] 0.5`\\)\[NoBreak] is not a valid value for an attribute in an \
XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.572175361453163*^9, 3.572175370844102*^9}, 3.5721758283538485`*^9, 
   3.5721762627012787`*^9, 3.5721781688488746`*^9, 3.572178900148555*^9, 
   3.572179311681165*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], ":", 
  " ", "\<\"Malformed symbolic XML expression encountered. This may result in \
unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.572175361453163*^9, 3.572175370844102*^9}, 3.5721758283538485`*^9, 
   3.5721762627012787`*^9, 3.5721781688488746`*^9, 3.572178900148555*^9, 
   3.572179311682165*^9}],

Cell[BoxData["\<\"PneumaticTsensor.xml\"\>"], "Output",
 CellChangeTimes->{
  3.535396359046875*^9, 3.5355411295625*^9, 3.568446784220931*^9, 
   3.5684494985493555`*^9, 3.5684505284942913`*^9, 3.5684505853929806`*^9, 
   3.568450688449285*^9, 3.568451035177059*^9, 3.568451066763059*^9, 
   3.568451206252059*^9, 3.568454862469064*^9, 3.5684568264944563`*^9, 
   3.568457457223836*^9, 3.568458845471343*^9, 3.56845897834863*^9, 
   3.5684590592547197`*^9, 3.5684601460486293`*^9, 3.5684602402226295`*^9, 
   3.5684605120096292`*^9, 3.568461911240922*^9, 3.568462056024399*^9, 
   3.56846215564436*^9, 3.5685213346798315`*^9, 3.5685221925184155`*^9, 
   3.568522312646415*^9, 3.5719988029437747`*^9, 3.571999398966984*^9, 
   3.57200037146953*^9, 3.5720005012612505`*^9, 3.572000557035514*^9, 
   3.5720039015478373`*^9, 3.5720050636811485`*^9, 3.572008639074849*^9, 
   3.57200924984692*^9, 3.5721616740016794`*^9, 3.572167677495006*^9, {
   3.5721753614861665`*^9, 3.572175370850103*^9}, 3.5721758283608494`*^9, 
   3.5721762627072797`*^9, 3.572178168888879*^9, 3.572178900153555*^9, 
   3.5721793116831656`*^9}]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell["Qm sensor", "Section",
 CellChangeTimes->{{3.5721748273855715`*^9, 3.572174828436571*^9}, 
   3.5721778743194246`*^9, {3.57217801438543*^9, 3.5721780176287537`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Pneumatic\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<Qmsensor\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Pneumatic massflow sensor\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentSignal\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFilenames", "[", 
   RowBox[{"defaultPath", ",", "domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.53537005401182*^9, 3.5353700749665146`*^9}, {
   3.535370954755151*^9, 3.53537097709949*^9}, {3.535371806611791*^9, 
   3.5353718188171687`*^9}, {3.568460231845629*^9, 3.5684602322386293`*^9}, 
   3.568460507404629*^9, 3.568461908210619*^9, 3.568462043263123*^9, 
   3.5684621491307087`*^9, 3.568462308536648*^9, {3.5721748132655716`*^9, 
   3.5721748240935717`*^9}, 3.5721776761776123`*^9, {3.572177921565149*^9, 
   3.5721779347914715`*^9}, {3.572177967992791*^9, 3.57217797468346*^9}, 
   3.575776814809924*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"nodeConnections", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"PneumaticCnode", "[", 
     RowBox[{"p1", ",", 
      RowBox[{"1.", "*", 
       RowBox[{"10", "^", "5"}]}], ",", "\"\<fluid port 1\>\""}], "]"}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535371324617521*^9, 3.5353713328141885`*^9}, {
   3.5353714053976307`*^9, 3.5353715232422905`*^9}, 3.535371590017808*^9, {
   3.5353717800159297`*^9, 3.535371782232251*^9}, 3.5353719570563393`*^9, {
   3.535542225*^9, 3.5355422264375*^9}, 3.5355423471875*^9, {
   3.5684501591780653`*^9, 3.5684501598331966`*^9}, {3.5684509147119093`*^9, 
   3.568450921142552*^9}, {3.568451191946059*^9, 3.5684511930270596`*^9}, 
   3.5684619057773757`*^9, {3.5684620390697036`*^9, 3.568462052820079*^9}, 
   3.56846215194499*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{
     "qmsensor", ",", "0.", ",", "double", ",", "\"\<kg/s\>\"", ",", 
      "\"\<massflow\>\""}], "}"}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.535527741234375*^9, 3.535527744390625*^9}, {
  3.535527776078125*^9, 3.5355278698125*^9}, {3.5720180179783173`*^9, 
  3.5720180202844496`*^9}, {3.572175251718191*^9, 3.5721752893289514`*^9}, {
  3.572177887402733*^9, 3.572177912859278*^9}, {3.572177984835475*^9, 
  3.5721779954015317`*^9}, {3.5721780949134817`*^9, 3.5721780951205025`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"expressions", " ", "=", " ", 
   RowBox[{"{", "\n", "\t\t", 
    RowBox[{"qmsensor", "\[Equal]", "qmp1"}], "\n", "\t\t\t", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{
  3.535371985774875*^9, {3.568450005757387*^9, 3.568450065837401*^9}, {
   3.5684501624737244`*^9, 3.568450164132056*^9}, {3.5720182209909296`*^9, 
   3.572018240371038*^9}, {3.572175295046523*^9, 3.5721753029853168`*^9}, {
   3.5721753422562437`*^9, 3.572175368382856*^9}, {3.5721778811001024`*^9, 
   3.572177907609753*^9}, {3.5721779824682384`*^9, 3.572177982812273*^9}, {
   3.572178855872555*^9, 3.572178856207555*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], ":", 
  " ", "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\\"typename\\\" \[Rule] \\\"PneumaticQmsensor\\\"\\)\\), \\(\\(\
\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"PneumaticQmsensor.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"PneumaticQmsensor.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] 0.5`\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Pp1\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
\\\"0.5\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Pqmsensor\\\"\\)\\)}\
\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\
\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"hopsanobjectappearance\\\", \
\\(\\({\\(\\(\\\"\\\" \[Ellipsis] \\\"\\\"\\)\\) \[Rule] \
\\(\\(\[LeftSkeleton] 5 \[RightSkeleton]\\)\\)}\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"modelobject\\\", \\(\\({\\(\\(\\\"typename\\\" \
\[Rule] \\\"PneumaticQmsensor\\\"\\)\\), \\(\\(\\(\\(\\\"\\\" \[Ellipsis] \
\\\"\\\"\\)\\) \[Rule] \\(\\(\\\"\\\" \[Ellipsis] \
\\\"\\\"\\)\\)\\)\\)}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \
\\(\\({\\(\\(\\\"isopath\\\" \[Rule] \\\"PneumaticQmsensor.svg\\\"\\)\\), \\(\
\\(\\\"iconrotation\\\" \[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \
\[Rule] \\\"PneumaticQmsensor.svg\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \
\\(\\({}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\
\\\"x\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] 0.5`\\)\\), \\(\\(\
\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Pp1\\\"\\)\
\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\(\[LeftSkeleton] 1 \
\[RightSkeleton]\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)\\)\\)]\\)\
\[NoBreak] is not a list of contents. The third item in an XMLElement must be \
a list of contents, even if it is an empty list. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.572175361453163*^9, 3.572175370844102*^9}, 3.5721758283538485`*^9, 
   3.5721762627012787`*^9, 3.572178168964886*^9, 3.572178900224555*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], ":", 
  " ", "\<\"Malformed symbolic XML expression encountered. This may result in \
unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.572175361453163*^9, 3.572175370844102*^9}, 3.5721758283538485`*^9, 
   3.5721762627012787`*^9, 3.572178168964886*^9, 3.572178900226555*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], ":", 
  " ", "\<\"\[NoBreak]\\!\\(0.5`\\)\[NoBreak] in \[NoBreak]\\!\\(\\\"y\\\" \
\[Rule] 0.5`\\)\[NoBreak] is not a valid value for an attribute in an \
XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.572175361453163*^9, 3.572175370844102*^9}, 3.5721758283538485`*^9, 
   3.5721762627012787`*^9, 3.572178168964886*^9, 3.572178900226555*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], ":", 
  " ", "\<\"Malformed symbolic XML expression encountered. This may result in \
unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.572175361453163*^9, 3.572175370844102*^9}, 3.5721758283538485`*^9, 
   3.5721762627012787`*^9, 3.572178168964886*^9, 3.572178900227555*^9}],

Cell[BoxData["\<\"PneumaticQmsensor.xml\"\>"], "Output",
 CellChangeTimes->{
  3.535396359046875*^9, 3.5355411295625*^9, 3.568446784220931*^9, 
   3.5684494985493555`*^9, 3.5684505284942913`*^9, 3.5684505853929806`*^9, 
   3.568450688449285*^9, 3.568451035177059*^9, 3.568451066763059*^9, 
   3.568451206252059*^9, 3.568454862469064*^9, 3.5684568264944563`*^9, 
   3.568457457223836*^9, 3.568458845471343*^9, 3.56845897834863*^9, 
   3.5684590592547197`*^9, 3.5684601460486293`*^9, 3.5684602402226295`*^9, 
   3.5684605120096292`*^9, 3.568461911240922*^9, 3.568462056024399*^9, 
   3.56846215564436*^9, 3.5685213346798315`*^9, 3.5685221925184155`*^9, 
   3.568522312646415*^9, 3.5719988029437747`*^9, 3.571999398966984*^9, 
   3.57200037146953*^9, 3.5720005012612505`*^9, 3.572000557035514*^9, 
   3.5720039015478373`*^9, 3.5720050636811485`*^9, 3.572008639074849*^9, 
   3.57200924984692*^9, 3.5721616740016794`*^9, 3.572167677495006*^9, {
   3.5721753614861665`*^9, 3.572175370850103*^9}, 3.5721758283608494`*^9, 
   3.5721762627072797`*^9, 3.5721781689708867`*^9, 3.5721789002285547`*^9}]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell["dE sensor", "Section",
 CellChangeTimes->{{3.5721748273855715`*^9, 3.572174828436571*^9}, 
   3.5721778743194246`*^9, {3.57217801438543*^9, 3.572178033801371*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Pneumatic\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<dEsensor\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Pneumatic energy flow sensor\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentSignal\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFilenames", "[", 
   RowBox[{"defaultPath", ",", "domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.53537005401182*^9, 3.5353700749665146`*^9}, {
   3.535370954755151*^9, 3.53537097709949*^9}, {3.535371806611791*^9, 
   3.5353718188171687`*^9}, {3.568460231845629*^9, 3.5684602322386293`*^9}, 
   3.568460507404629*^9, 3.568461908210619*^9, 3.568462043263123*^9, 
   3.5684621491307087`*^9, 3.568462308536648*^9, {3.5721748132655716`*^9, 
   3.5721748240935717`*^9}, 3.5721776761776123`*^9, {3.572177921565149*^9, 
   3.5721779347914715`*^9}, {3.572177967992791*^9, 3.57217797468346*^9}, {
   3.5721780451375046`*^9, 3.5721780717091618`*^9}, 3.5757768156217422`*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"nodeConnections", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"PneumaticCnode", "[", 
     RowBox[{"p1", ",", 
      RowBox[{"1.", "*", 
       RowBox[{"10", "^", "5"}]}], ",", "\"\<fluid port 1\>\""}], "]"}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535371324617521*^9, 3.5353713328141885`*^9}, {
   3.5353714053976307`*^9, 3.5353715232422905`*^9}, 3.535371590017808*^9, {
   3.5353717800159297`*^9, 3.535371782232251*^9}, 3.5353719570563393`*^9, {
   3.535542225*^9, 3.5355422264375*^9}, 3.5355423471875*^9, {
   3.5684501591780653`*^9, 3.5684501598331966`*^9}, {3.5684509147119093`*^9, 
   3.568450921142552*^9}, {3.568451191946059*^9, 3.5684511930270596`*^9}, 
   3.5684619057773757`*^9, {3.5684620390697036`*^9, 3.568462052820079*^9}, 
   3.56846215194499*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{
     "dEsensor", ",", "0.", ",", "double", ",", "\"\<J/s\>\"", ",", 
      "\"\<energy flow\>\""}], "}"}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.535527741234375*^9, 3.535527744390625*^9}, {
  3.535527776078125*^9, 3.5355278698125*^9}, {3.5720180179783173`*^9, 
  3.5720180202844496`*^9}, {3.572175251718191*^9, 3.5721752893289514`*^9}, {
  3.572177887402733*^9, 3.572177912859278*^9}, {3.572177984835475*^9, 
  3.5721779954015317`*^9}, {3.572178056302621*^9, 3.5721780836773586`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"expressions", " ", "=", " ", 
   RowBox[{"{", "\n", "\t\t", 
    RowBox[{"dEsensor", "\[Equal]", "dEp1"}], "\n", "\t\t\t", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{
  3.535371985774875*^9, {3.568450005757387*^9, 3.568450065837401*^9}, {
   3.5684501624737244`*^9, 3.568450164132056*^9}, {3.5720182209909296`*^9, 
   3.572018240371038*^9}, {3.572175295046523*^9, 3.5721753029853168`*^9}, {
   3.5721753422562437`*^9, 3.572175368382856*^9}, {3.5721778811001024`*^9, 
   3.572177907609753*^9}, {3.5721779824682384`*^9, 3.572177982812273*^9}, {
   3.572178059212912*^9, 3.572178059533944*^9}, {3.5721788657545547`*^9, 
   3.5721788662025547`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "cntsList"}], "MessageName"], ":", 
  " ", "\<\"\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"modelobject\\\", \
\\(\\({\\(\\(\\\"typename\\\" \[Rule] \\\"PneumaticdEsensor\\\"\\)\\), \\(\\(\
\[LeftSkeleton] 1 \[RightSkeleton]\\)\\)}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \\(\\({\\(\\(\\\"isopath\\\" \
\[Rule] \\\"PneumaticdEsensor.svg\\\"\\)\\), \\(\\(\\\"iconrotation\\\" \
\[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \[Rule] \
\\\"PneumaticdEsensor.svg\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \\(\\({}\\)\\), \
\\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \
\[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] 0.5`\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \
\\\"Pp1\\\"\\)\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\\\"x\\\" \[Rule] \
\\\"0.5\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] \\\"1\\\"\\)\\), \\(\\(\\\"a\\\" \
\[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"PdEsensor\\\"\\)\\)}\
\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\
\[NoBreak] in \
\[NoBreak]\\!\\(XMLElement[\\(\\(\\\"hopsanobjectappearance\\\", \
\\(\\({\\(\\(\\\"\\\" \[Ellipsis] \\\"\\\"\\)\\) \[Rule] \
\\(\\(\[LeftSkeleton] 5 \[RightSkeleton]\\)\\)}\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"modelobject\\\", \\(\\({\\(\\(\\\"typename\\\" \
\[Rule] \\\"PneumaticdEsensor\\\"\\)\\), \\(\\(\\(\\(\\\"\\\" \[Ellipsis] \
\\\"\\\"\\)\\) \[Rule] \\(\\(\\\"\\\" \[Ellipsis] \
\\\"\\\"\\)\\)\\)\\)}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"icon\\\", \
\\(\\({\\(\\(\\\"isopath\\\" \[Rule] \\\"PneumaticdEsensor.svg\\\"\\)\\), \\(\
\\(\\\"iconrotation\\\" \[Rule] \\\"ON\\\"\\)\\), \\(\\(\\\"userpath\\\" \
\[Rule] \\\"PneumaticdEsensor.svg\\\"\\)\\)}\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\), \\(\\(XMLElement[\\(\\(\\\"portpositions\\\", \
\\(\\({}\\)\\), \\(\\({\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\({\\(\\(\
\\\"x\\\" \[Rule] \\\"0\\\"\\)\\), \\(\\(\\\"y\\\" \[Rule] 0.5`\\)\\), \\(\\(\
\\\"a\\\" \[Rule] \\\"90\\\"\\)\\), \\(\\(\\\"name\\\" \[Rule] \\\"Pp1\\\"\\)\
\\)}\\)\\), \\(\\({}\\)\\)\\)\\)]\\)\\), \
\\(\\(XMLElement[\\(\\(\\\"portpose\\\", \\(\\(\[LeftSkeleton] 1 \
\[RightSkeleton]\\)\\), \
\\(\\({}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)}\\)\\)\\)\\)]\\)\\)\\)\\)]\\)\
\[NoBreak] is not a list of contents. The third item in an XMLElement must be \
a list of contents, even if it is an empty list. \\!\\(\\*ButtonBox[\\\"\
\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::cntsList\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.572175361453163*^9, 3.572175370844102*^9}, 3.5721758283538485`*^9, 
   3.5721762627012787`*^9, 3.572178169034893*^9, 3.5721789002895546`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], ":", 
  " ", "\<\"Malformed symbolic XML expression encountered. This may result in \
unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.572175361453163*^9, 3.572175370844102*^9}, 3.5721758283538485`*^9, 
   3.5721762627012787`*^9, 3.572178169034893*^9, 3.572178900290555*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"XMLElement", "::", "attrhs"}], "MessageName"], ":", 
  " ", "\<\"\[NoBreak]\\!\\(0.5`\\)\[NoBreak] in \[NoBreak]\\!\\(\\\"y\\\" \
\[Rule] 0.5`\\)\[NoBreak] is not a valid value for an attribute in an \
XMLElement. The value of the attribute must be a string. \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/XMLElement\\\", ButtonNote -> \
\\\"XMLElement::attrhs\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.572175361453163*^9, 3.572175370844102*^9}, 3.5721758283538485`*^9, 
   3.5721762627012787`*^9, 3.572178169034893*^9, 3.5721789002915545`*^9}],

Cell[BoxData[
 RowBox[{
  StyleBox[
   RowBox[{"Export", "::", "autofix"}], "MessageName"], ":", 
  " ", "\<\"Malformed symbolic XML expression encountered. This may result in \
unexpected XML data. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/Export\\\", ButtonNote -> \\\"Export::autofix\\\"]\
\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.535396358875*^9, 3.535541129421875*^9, 3.5684467842149315`*^9, 
   3.568449498516349*^9, 3.5684505284782896`*^9, 3.5684505853759785`*^9, 
   3.5684506884252825`*^9, 3.568451035167059*^9, 3.568451066731059*^9, 
   3.5684512062180595`*^9, 3.5684548624540625`*^9, 3.5684568264514523`*^9, 
   3.5684574571808357`*^9, 3.5684588454443407`*^9, 3.568458978291624*^9, 
   3.568459059216716*^9, 3.568460146032629*^9, 3.5684602402056293`*^9, 
   3.5684605119936295`*^9, 3.56846191122192*^9, 3.5684620560113974`*^9, 
   3.568462155633359*^9, 3.5685213346628294`*^9, 3.5685221925074153`*^9, 
   3.568522312587415*^9, 3.571998802928175*^9, 3.5719993989513826`*^9, 
   3.57200037146953*^9, 3.572000501245651*^9, 3.5720005570199137`*^9, 
   3.572003901516637*^9, 3.572005063665549*^9, 3.5720086390598474`*^9, 
   3.572009249834919*^9, 3.572161673993678*^9, 3.572167677480005*^9, {
   3.572175361453163*^9, 3.572175370844102*^9}, 3.5721758283538485`*^9, 
   3.5721762627012787`*^9, 3.572178169034893*^9, 3.572178900292555*^9}],

Cell[BoxData["\<\"PneumaticdEsensor.xml\"\>"], "Output",
 CellChangeTimes->{
  3.535396359046875*^9, 3.5355411295625*^9, 3.568446784220931*^9, 
   3.5684494985493555`*^9, 3.5684505284942913`*^9, 3.5684505853929806`*^9, 
   3.568450688449285*^9, 3.568451035177059*^9, 3.568451066763059*^9, 
   3.568451206252059*^9, 3.568454862469064*^9, 3.5684568264944563`*^9, 
   3.568457457223836*^9, 3.568458845471343*^9, 3.56845897834863*^9, 
   3.5684590592547197`*^9, 3.5684601460486293`*^9, 3.5684602402226295`*^9, 
   3.5684605120096292`*^9, 3.568461911240922*^9, 3.568462056024399*^9, 
   3.56846215564436*^9, 3.5685213346798315`*^9, 3.5685221925184155`*^9, 
   3.568522312646415*^9, 3.5719988029437747`*^9, 3.571999398966984*^9, 
   3.57200037146953*^9, 3.5720005012612505`*^9, 3.572000557035514*^9, 
   3.5720039015478373`*^9, 3.5720050636811485`*^9, 3.572008639074849*^9, 
   3.57200924984692*^9, 3.5721616740016794`*^9, 3.572167677495006*^9, {
   3.5721753614861665`*^9, 3.572175370850103*^9}, 3.5721758283608494`*^9, 
   3.5721762627072797`*^9, 3.5721781690398936`*^9, 3.572178900293555*^9}]
}, Open  ]]
}, Closed]]
}, Closed]]
},
CellGrouping->Manual,
WindowSize->{866, 768},
WindowMargins->{{156, Automatic}, {11, Automatic}},
Magnification->1.2000000476837158`,
FrontEndVersion->"8.0 for Microsoft Windows (64-bit) (October 6, 2011)",
StyleDefinitions->FrontEnd`FileName[{"Creative"}, "PastelColor.nb", 
  CharacterEncoding -> "WindowsANSI"]
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[567, 22, 49, 0, 79, "Title"],
Cell[CellGroupData[{
Cell[641, 26, 177, 3, 90, "Section"],
Cell[821, 31, 377, 6, 55, "Input"],
Cell[1201, 39, 124, 3, 55, "Input"],
Cell[1328, 44, 576, 12, 104, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[1941, 61, 124, 2, 54, "Section"],
Cell[2068, 65, 931, 24, 224, "Input"],
Cell[3002, 91, 114, 2, 55, "Input"],
Cell[3119, 95, 418, 10, 55, "Input"],
Cell[3540, 107, 1502, 36, 248, "Input"],
Cell[5045, 145, 917, 19, 104, "Input"],
Cell[5965, 166, 860, 17, 104, "Input"],
Cell[6828, 185, 142, 5, 62, "Text"],
Cell[CellGroupData[{
Cell[6995, 194, 46, 0, 51, "Subsection"],
Cell[CellGroupData[{
Cell[7066, 198, 44, 0, 36, "Subsubsection"],
Cell[7113, 200, 1069, 38, 133, "Input"],
Cell[8185, 240, 410, 16, 224, "Input"],
Cell[8598, 258, 844, 32, 253, "Input"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[9491, 296, 31, 0, 73, "Subsection"],
Cell[9525, 298, 218, 6, 108, "Input"],
Cell[9746, 306, 195, 5, 79, "Input"],
Cell[9944, 313, 176, 5, 79, "Input"],
Cell[10123, 320, 199, 7, 43, "DisplayFormula"],
Cell[CellGroupData[{
Cell[10347, 331, 69, 1, 79, "Input"],
Cell[10419, 334, 1348, 19, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[11804, 358, 303, 9, 112, "Input"],
Cell[12110, 369, 1680, 28, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[13827, 402, 311, 10, 79, "Input"],
Cell[14141, 414, 1611, 25, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[15789, 444, 194, 5, 79, "Input"],
Cell[15986, 451, 1623, 26, 70, "Output"],
Cell[CellGroupData[{
Cell[17634, 481, 214, 6, 115, "Input"],
Cell[CellGroupData[{
Cell[17873, 491, 144, 3, 79, "Input"],
Cell[18020, 496, 1610, 25, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[19667, 526, 30, 0, 79, "Input"],
Cell[19700, 528, 1534, 22, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[21271, 555, 185, 6, 79, "Input"],
Cell[21459, 563, 1573, 24, 70, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[23081, 593, 120, 3, 79, "Input"],
Cell[23204, 598, 1576, 24, 70, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[24829, 628, 145, 3, 79, "Input"],
Cell[24977, 633, 1406, 21, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[26420, 659, 405, 13, 79, "Input"],
Cell[26828, 674, 1646, 27, 70, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[28523, 707, 42, 0, 73, "Subsection"],
Cell[28568, 709, 66, 2, 79, "Input"],
Cell[28637, 713, 39, 0, 54, "Text"],
Cell[CellGroupData[{
Cell[28701, 717, 91, 2, 79, "Input"],
Cell[28795, 721, 1834, 32, 70, "Output"]
}, Open  ]],
Cell[30644, 756, 46, 0, 54, "Text"],
Cell[CellGroupData[{
Cell[30715, 760, 94, 2, 79, "Input"],
Cell[30812, 764, 1913, 35, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[32762, 804, 369, 10, 79, "Input"],
Cell[33134, 816, 2165, 43, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[35336, 864, 262, 8, 79, "Input"],
Cell[35601, 874, 1614, 26, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[37252, 905, 258, 8, 79, "Input"],
Cell[37513, 915, 1644, 26, 70, "Output"]
}, Open  ]],
Cell[39172, 944, 47, 0, 54, "Text"],
Cell[39222, 946, 80, 2, 79, "Input"],
Cell[CellGroupData[{
Cell[39327, 952, 30, 0, 79, "Input"],
Cell[39360, 954, 1259, 18, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[40656, 977, 330, 9, 79, "Input"],
Cell[40989, 988, 2185, 44, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[43211, 1037, 262, 8, 79, "Input"],
Cell[43476, 1047, 1611, 26, 70, "Output"]
}, Open  ]],
Cell[45102, 1076, 140, 3, 54, "Text"],
Cell[45245, 1081, 61, 0, 54, "Text"],
Cell[CellGroupData[{
Cell[45331, 1085, 88, 2, 79, "Input"],
Cell[45422, 1089, 1579, 25, 70, "Output"]
}, Open  ]],
Cell[47016, 1117, 446, 9, 90, "Text"],
Cell[47465, 1128, 47, 0, 54, "Text"],
Cell[47515, 1130, 115, 2, 79, "Input"],
Cell[47633, 1134, 545, 11, 109, "Input"],
Cell[48181, 1147, 223, 5, 79, "Input"],
Cell[48407, 1154, 144, 4, 115, "Input"],
Cell[48554, 1160, 52, 0, 54, "Text"],
Cell[CellGroupData[{
Cell[48631, 1164, 203, 6, 79, "Input"],
Cell[48837, 1172, 1566, 24, 70, "Output"]
}, Open  ]],
Cell[50418, 1199, 70, 0, 54, "Text"],
Cell[50491, 1201, 122, 4, 90, "Text"],
Cell[50616, 1207, 74, 2, 109, "Output"],
Cell[CellGroupData[{
Cell[50715, 1213, 115, 3, 115, "Input"],
Cell[50833, 1218, 1627, 26, 70, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[52509, 1250, 68, 1, 79, "Input"],
Cell[52580, 1253, 1279, 18, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[53896, 1276, 92, 1, 79, "Input"],
Cell[53991, 1279, 1341, 22, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[55369, 1306, 37, 0, 73, "Subsection"],
Cell[CellGroupData[{
Cell[55431, 1310, 110, 3, 79, "Input"],
Cell[55544, 1315, 1507, 23, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[57088, 1343, 208, 4, 79, "Input"],
Cell[57299, 1349, 1539, 23, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[58875, 1377, 183, 4, 79, "Input"],
Cell[59061, 1383, 1520, 23, 70, "Output"]
}, Open  ]],
Cell[60596, 1409, 48, 1, 79, "Input"],
Cell[CellGroupData[{
Cell[60669, 1414, 219, 7, 115, "Input"],
Cell[60891, 1423, 1615, 27, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[62543, 1455, 111, 3, 79, "Input"],
Cell[62657, 1460, 2007, 40, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[64701, 1505, 315, 11, 109, "Input"],
Cell[65019, 1518, 1728, 31, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[66784, 1554, 249, 8, 79, "Input"],
Cell[67036, 1564, 2011, 40, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[69084, 1609, 53, 0, 51, "Subsubsection"],
Cell[69140, 1611, 538, 16, 115, "Input"],
Cell[69681, 1629, 521, 16, 176, "Input"]
}, Open  ]]
}, Open  ]],
Cell[70229, 1649, 117, 2, 79, "Input"],
Cell[70349, 1653, 932, 26, 319, "Input"],
Cell[71284, 1681, 1195, 28, 294, "Input"],
Cell[72482, 1711, 145, 3, 55, "Input"],
Cell[72630, 1716, 122, 2, 55, "Input"],
Cell[72755, 1720, 1032, 22, 246, "Input"],
Cell[73790, 1744, 819, 15, 224, "Input"],
Cell[CellGroupData[{
Cell[74634, 1763, 63, 1, 55, "Input"],
Cell[74700, 1766, 850, 16, 70, "Message"],
Cell[75553, 1784, 2237, 36, 70, "Message"],
Cell[77793, 1822, 776, 15, 70, "Message"],
Cell[78572, 1839, 925, 17, 70, "Message"],
Cell[79500, 1858, 776, 15, 70, "Message"],
Cell[80279, 1875, 923, 17, 70, "Message"],
Cell[81205, 1894, 778, 15, 70, "Message"],
Cell[81986, 1911, 852, 16, 70, "Message"],
Cell[82841, 1929, 1262, 18, 70, "Output"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[84152, 1953, 181, 3, 54, "Section"],
Cell[84336, 1958, 979, 24, 224, "Input"],
Cell[85318, 1984, 114, 2, 55, "Input"],
Cell[85435, 1988, 418, 10, 55, "Input"],
Cell[85856, 2000, 1502, 36, 248, "Input"],
Cell[87361, 2038, 968, 20, 104, "Input"],
Cell[88332, 2060, 887, 17, 104, "Input"],
Cell[CellGroupData[{
Cell[89244, 2081, 46, 0, 51, "Subsection"],
Cell[CellGroupData[{
Cell[89315, 2085, 44, 0, 36, "Subsubsection"],
Cell[89362, 2087, 1069, 38, 133, "Input"],
Cell[90434, 2127, 410, 16, 224, "Input"],
Cell[90847, 2145, 844, 32, 176, "Input"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[91740, 2183, 31, 0, 51, "Subsection"],
Cell[91774, 2185, 218, 6, 75, "Input"],
Cell[91995, 2193, 195, 5, 55, "Input"],
Cell[92193, 2200, 176, 5, 55, "Input"],
Cell[92372, 2207, 199, 7, 30, "DisplayFormula"],
Cell[CellGroupData[{
Cell[92596, 2218, 69, 1, 55, "Input"],
Cell[92668, 2221, 1347, 19, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[94052, 2245, 303, 9, 79, "Input"],
Cell[94358, 2256, 1679, 28, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[96074, 2289, 311, 10, 55, "Input"],
Cell[96388, 2301, 1612, 25, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[98037, 2331, 194, 5, 55, "Input"],
Cell[98234, 2338, 1629, 26, 70, "Output"],
Cell[CellGroupData[{
Cell[99888, 2368, 214, 6, 80, "Input"],
Cell[CellGroupData[{
Cell[100127, 2378, 144, 3, 55, "Input"],
Cell[100274, 2383, 1605, 25, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[101916, 2413, 30, 0, 55, "Input"],
Cell[101949, 2415, 1532, 22, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[103518, 2442, 185, 6, 55, "Input"],
Cell[103706, 2450, 1570, 24, 70, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[105325, 2480, 120, 3, 55, "Input"],
Cell[105448, 2485, 1573, 24, 70, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[107070, 2515, 145, 3, 55, "Input"],
Cell[107218, 2520, 1405, 21, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[108660, 2546, 405, 13, 55, "Input"],
Cell[109068, 2561, 1647, 27, 70, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[110764, 2594, 42, 0, 51, "Subsection"],
Cell[110809, 2596, 66, 2, 55, "Input"],
Cell[110878, 2600, 39, 0, 38, "Text"],
Cell[CellGroupData[{
Cell[110942, 2604, 91, 2, 55, "Input"],
Cell[111036, 2608, 1830, 32, 70, "Output"]
}, Open  ]],
Cell[112881, 2643, 46, 0, 38, "Text"],
Cell[CellGroupData[{
Cell[112952, 2647, 94, 2, 55, "Input"],
Cell[113049, 2651, 1915, 35, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[115001, 2691, 369, 10, 55, "Input"],
Cell[115373, 2703, 2161, 43, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[117571, 2751, 262, 8, 55, "Input"],
Cell[117836, 2761, 1614, 26, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[119487, 2792, 258, 8, 55, "Input"],
Cell[119748, 2802, 1643, 26, 70, "Output"]
}, Open  ]],
Cell[121406, 2831, 47, 0, 38, "Text"],
Cell[121456, 2833, 80, 2, 55, "Input"],
Cell[CellGroupData[{
Cell[121561, 2839, 30, 0, 55, "Input"],
Cell[121594, 2841, 1257, 18, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[122888, 2864, 330, 9, 55, "Input"],
Cell[123221, 2875, 2180, 44, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[125438, 2924, 262, 8, 55, "Input"],
Cell[125703, 2934, 1609, 26, 70, "Output"]
}, Open  ]],
Cell[127327, 2963, 140, 3, 45, "Text"],
Cell[127470, 2968, 61, 0, 38, "Text"],
Cell[CellGroupData[{
Cell[127556, 2972, 88, 2, 55, "Input"],
Cell[127647, 2976, 1582, 25, 70, "Output"]
}, Open  ]],
Cell[129244, 3004, 446, 9, 75, "Text"],
Cell[129693, 3015, 47, 0, 38, "Text"],
Cell[129743, 3017, 115, 2, 55, "Input"],
Cell[129861, 3021, 545, 11, 76, "Input"],
Cell[130409, 3034, 223, 5, 55, "Input"],
Cell[130635, 3041, 144, 4, 80, "Input"],
Cell[130782, 3047, 52, 0, 38, "Text"],
Cell[CellGroupData[{
Cell[130859, 3051, 203, 6, 55, "Input"],
Cell[131065, 3059, 1564, 24, 70, "Output"]
}, Open  ]],
Cell[132644, 3086, 70, 0, 45, "Text"],
Cell[132717, 3088, 122, 4, 75, "Text"],
Cell[132842, 3094, 74, 2, 76, "Output"],
Cell[CellGroupData[{
Cell[132941, 3100, 115, 3, 80, "Input"],
Cell[133059, 3105, 1627, 26, 70, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[134735, 3137, 213, 5, 80, "Input"],
Cell[134951, 3144, 388, 8, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[135376, 3157, 68, 1, 55, "Input"],
Cell[135447, 3160, 1273, 18, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[136757, 3183, 92, 1, 55, "Input"],
Cell[136852, 3186, 1347, 22, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[138236, 3213, 37, 0, 51, "Subsection"],
Cell[CellGroupData[{
Cell[138298, 3217, 110, 3, 55, "Input"],
Cell[138411, 3222, 1503, 23, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[139951, 3250, 208, 4, 55, "Input"],
Cell[140162, 3256, 1539, 23, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[141738, 3284, 183, 4, 55, "Input"],
Cell[141924, 3290, 1519, 23, 70, "Output"]
}, Open  ]],
Cell[143458, 3316, 48, 1, 55, "Input"],
Cell[CellGroupData[{
Cell[143531, 3321, 219, 7, 80, "Input"],
Cell[143753, 3330, 1617, 27, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[145407, 3362, 111, 3, 55, "Input"],
Cell[145521, 3367, 2016, 40, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[147574, 3412, 315, 11, 76, "Input"],
Cell[147892, 3425, 1725, 31, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[149654, 3461, 249, 8, 55, "Input"],
Cell[149906, 3471, 2011, 40, 70, "Output"]
}, Open  ]],
Cell[151932, 3514, 666, 12, 80, "Input"],
Cell[CellGroupData[{
Cell[152623, 3530, 53, 0, 36, "Subsubsection"],
Cell[152679, 3532, 538, 16, 80, "Input"],
Cell[153220, 3550, 521, 16, 123, "Input"]
}, Open  ]]
}, Open  ]],
Cell[153768, 3570, 117, 2, 55, "Input"],
Cell[153888, 3574, 932, 26, 222, "Input"],
Cell[154823, 3602, 1236, 28, 294, "Input"],
Cell[156062, 3632, 145, 3, 55, "Input"],
Cell[156210, 3637, 122, 2, 55, "Input"],
Cell[156335, 3641, 1032, 22, 246, "Input"],
Cell[157370, 3665, 819, 15, 224, "Input"],
Cell[CellGroupData[{
Cell[158214, 3684, 63, 1, 55, "Input"],
Cell[158280, 3687, 843, 16, 70, "Message"],
Cell[159126, 3705, 840, 16, 70, "Message"],
Cell[159969, 3723, 838, 16, 70, "Message"],
Cell[160810, 3741, 838, 16, 70, "Message"],
Cell[161651, 3759, 839, 16, 70, "Message"],
Cell[162493, 3777, 2476, 38, 70, "Message"],
Cell[164972, 3817, 771, 15, 70, "Message"],
Cell[165746, 3834, 915, 17, 70, "Message"],
Cell[166664, 3853, 771, 15, 70, "Message"],
Cell[167438, 3870, 915, 17, 70, "Message"],
Cell[168356, 3889, 771, 15, 70, "Message"],
Cell[169130, 3906, 845, 16, 70, "Message"],
Cell[169978, 3924, 1269, 18, 70, "Output"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[171296, 3948, 121, 2, 54, "Section"],
Cell[171420, 3952, 1148, 27, 224, "Input"],
Cell[172571, 3981, 115, 2, 55, "Input"],
Cell[172689, 3985, 1076, 25, 176, "Input"],
Cell[173768, 4012, 521, 12, 104, "Input"],
Cell[174292, 4026, 835, 18, 128, "Input"],
Cell[175130, 4046, 776, 15, 128, "Input"],
Cell[175909, 4063, 142, 5, 62, "Text"],
Cell[CellGroupData[{
Cell[176076, 4072, 90, 2, 51, "Subsection",
 Evaluatable->False,
 PageBreakAbove->False],
Cell[176169, 4076, 76, 0, 38, "Text"],
Cell[176248, 4078, 116, 2, 55, "Input"],
Cell[CellGroupData[{
Cell[176389, 4084, 209, 5, 55, "Input"],
Cell[CellGroupData[{
Cell[176623, 4093, 92, 2, 55, "Input"],
Cell[176718, 4097, 265, 4, 70, "Output"]
}, Open  ]]
}, Open  ]],
Cell[177010, 4105, 242, 6, 84, "Input"],
Cell[177255, 4113, 241, 6, 84, "Input"],
Cell[177499, 4121, 693, 20, 109, "Input"],
Cell[178195, 4143, 686, 20, 109, "Input"],
Cell[178884, 4165, 1323, 39, 132, "Input"],
Cell[180210, 4206, 1291, 33, 130, "Input"],
Cell[181504, 4241, 1234, 32, 130, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[182775, 4278, 61, 0, 73, "Subsection"],
Cell[CellGroupData[{
Cell[182861, 4282, 35, 0, 36, "Subsubsection"],
Cell[182899, 4284, 641, 16, 138, "Input"],
Cell[183543, 4302, 1574, 54, 658, "Input"],
Cell[185120, 4358, 523, 17, 177, "Input"],
Cell[185646, 4377, 848, 25, 552, "Input"],
Cell[CellGroupData[{
Cell[186519, 4406, 174, 3, 94, "Input"],
Cell[186696, 4411, 4227, 103, 70, "Output"]
}, Open  ]],
Cell[190938, 4517, 521, 14, 94, "Input"],
Cell[191462, 4533, 89, 2, 94, "Input"],
Cell[CellGroupData[{
Cell[191576, 4539, 30, 0, 94, "Input"],
Cell[191609, 4541, 1556, 21, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[193202, 4567, 28, 0, 94, "Input"],
Cell[193233, 4569, 2563, 57, 70, "Output"]
}, Open  ]],
Cell[195811, 4629, 190, 5, 138, "Input"],
Cell[CellGroupData[{
Cell[196026, 4638, 323, 9, 94, "Input"],
Cell[196352, 4649, 6345, 108, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[202734, 4762, 29, 0, 94, "Input"],
Cell[202766, 4764, 2573, 56, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[205376, 4825, 71, 1, 94, "Input"],
Cell[205450, 4828, 1533, 21, 70, "Output"]
}, Open  ]],
Cell[206998, 4852, 171, 4, 94, "Input"],
Cell[207172, 4858, 364, 12, 177, "Input"],
Cell[CellGroupData[{
Cell[207561, 4874, 801, 23, 261, "Input"],
Cell[208365, 4899, 2690, 47, 70, "Output"]
}, Open  ]],
Cell[211070, 4949, 773, 27, 552, "Input"],
Cell[211846, 4978, 597, 20, 345, "Input"]
}, Closed]]
}, Open  ]],
Cell[212470, 5002, 99, 1, 73, "Subsection"],
Cell[212572, 5005, 41, 0, 33, "Text"],
Cell[212616, 5007, 1764, 53, 421, "Input"],
Cell[214383, 5062, 2337, 56, 376, "Input"],
Cell[216723, 5120, 256, 6, 55, "Input"],
Cell[CellGroupData[{
Cell[217004, 5130, 31, 0, 51, "Subsection"],
Cell[217038, 5132, 637, 16, 128, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[217712, 5153, 106, 1, 55, "Input"],
Cell[217821, 5156, 1407, 22, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[219265, 5183, 33, 0, 51, "Subsection"],
Cell[219301, 5185, 91, 2, 38, "Text"],
Cell[219395, 5189, 354, 7, 104, "Input"],
Cell[219752, 5198, 51, 1, 38, "Text",
 Evaluatable->False],
Cell[CellGroupData[{
Cell[219828, 5203, 332, 9, 55, "Input"],
Cell[220163, 5214, 1553, 23, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[221753, 5242, 63, 1, 55, "Input"],
Cell[221819, 5245, 2126, 34, 70, "Message"],
Cell[223948, 5281, 667, 13, 70, "Message"],
Cell[224618, 5296, 814, 15, 70, "Message"],
Cell[225435, 5313, 665, 13, 70, "Message"],
Cell[226103, 5328, 812, 15, 70, "Message"],
Cell[226918, 5345, 665, 13, 70, "Message"],
Cell[227586, 5360, 741, 14, 70, "Message"],
Cell[228330, 5376, 780, 14, 70, "Message"],
Cell[229113, 5392, 744, 14, 70, "Message"],
Cell[229860, 5408, 1577, 22, 70, "Output"]
}, Open  ]]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[231498, 5437, 174, 2, 54, "Section"],
Cell[231675, 5441, 1209, 28, 224, "Input"],
Cell[232887, 5471, 1076, 25, 176, "Input"],
Cell[233966, 5498, 142, 5, 62, "Text"],
Cell[CellGroupData[{
Cell[234133, 5507, 90, 2, 51, "Subsection",
 Evaluatable->False,
 PageBreakAbove->False],
Cell[234226, 5511, 76, 0, 38, "Text"]
}, Open  ]],
Cell[234317, 5514, 99, 1, 51, "Subsection"],
Cell[234419, 5517, 41, 0, 33, "Text"],
Cell[234463, 5519, 971, 19, 152, "Input"],
Cell[235437, 5540, 1474, 39, 200, "Input"],
Cell[236914, 5581, 440, 9, 55, "Input"],
Cell[CellGroupData[{
Cell[237379, 5594, 102, 1, 51, "Subsection"],
Cell[237484, 5597, 850, 22, 152, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[238371, 5624, 106, 1, 55, "Input"],
Cell[238480, 5627, 1486, 23, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[240003, 5655, 63, 1, 55, "Input"],
Cell[240069, 5658, 679, 14, 70, "Message"],
Cell[240751, 5674, 679, 14, 70, "Message"],
Cell[241433, 5690, 679, 14, 70, "Message"],
Cell[242115, 5706, 757, 15, 70, "Message"],
Cell[242875, 5723, 2241, 36, 70, "Message"],
Cell[245119, 5761, 685, 14, 70, "Message"],
Cell[245807, 5777, 804, 15, 70, "Message"],
Cell[246614, 5794, 687, 14, 70, "Message"],
Cell[247304, 5810, 802, 15, 70, "Message"],
Cell[248109, 5827, 687, 14, 70, "Message"],
Cell[248799, 5843, 757, 15, 70, "Message"],
Cell[249559, 5860, 800, 15, 70, "Message"],
Cell[250362, 5877, 764, 15, 70, "Message"],
Cell[251129, 5894, 1607, 22, 70, "Output"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[252785, 5922, 148, 2, 54, "Section"],
Cell[252936, 5926, 980, 24, 224, "Input"],
Cell[253919, 5952, 775, 17, 128, "Input"],
Cell[254697, 5971, 502, 11, 104, "Input"],
Cell[255202, 5984, 675, 14, 104, "Input"],
Cell[255880, 6000, 699, 14, 104, "Input"],
Cell[256582, 6016, 142, 5, 62, "Text"],
Cell[256727, 6023, 1405, 28, 176, "Input"],
Cell[CellGroupData[{
Cell[258157, 6055, 63, 1, 55, "Input"],
Cell[258223, 6058, 3104, 47, 70, "Message"],
Cell[261330, 6107, 1307, 22, 70, "Message"],
Cell[262640, 6131, 1424, 23, 70, "Message"],
Cell[264067, 6156, 1309, 22, 70, "Message"],
Cell[265379, 6180, 1456, 24, 70, "Message"],
Cell[266838, 6206, 1307, 22, 70, "Message"],
Cell[268148, 6230, 1383, 23, 70, "Message"],
Cell[269534, 6255, 1454, 24, 70, "Message"],
Cell[270991, 6281, 1384, 23, 70, "Message"],
Cell[272378, 6306, 948, 13, 70, "Output"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[273375, 6325, 28, 0, 54, "Section"],
Cell[273406, 6327, 1222, 28, 224, "Input"],
Cell[274631, 6357, 605, 15, 128, "Input"],
Cell[275239, 6374, 849, 16, 104, "Input"],
Cell[276091, 6392, 140, 5, 62, "Text"],
Cell[276234, 6399, 506, 12, 152, "Input"],
Cell[CellGroupData[{
Cell[276765, 6415, 96, 1, 55, "Input"],
Cell[276864, 6418, 530, 8, 70, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[277431, 6431, 63, 1, 55, "Input"],
Cell[277497, 6434, 3352, 51, 70, "Message"],
Cell[280852, 6487, 1478, 25, 70, "Message"],
Cell[282333, 6514, 1595, 26, 70, "Message"],
Cell[283931, 6542, 1478, 25, 70, "Message"],
Cell[285412, 6569, 1625, 27, 70, "Message"],
Cell[287040, 6598, 1478, 25, 70, "Message"],
Cell[288521, 6625, 1554, 26, 70, "Message"],
Cell[290078, 6653, 1627, 27, 70, "Message"],
Cell[291708, 6682, 1555, 26, 70, "Message"],
Cell[293266, 6710, 1118, 16, 70, "Output"]
}, Open  ]]
}, Closed]]
}, Open  ]],
Cell[CellGroupData[{
Cell[294445, 6733, 133, 3, 79, "Title"],
Cell[CellGroupData[{
Cell[294603, 6740, 95, 1, 108, "Section"],
Cell[294701, 6743, 1338, 29, 224, "Input"],
Cell[296042, 6774, 849, 16, 104, "Input"],
Cell[296894, 6792, 558, 12, 104, "Input"],
Cell[297455, 6806, 479, 10, 104, "Input"],
Cell[CellGroupData[{
Cell[297959, 6820, 63, 1, 55, "Input"],
Cell[298025, 6823, 2678, 41, 190, "Message"],
Cell[300706, 6866, 1391, 23, 31, "Message"],
Cell[302100, 6891, 1508, 24, 58, "Message"],
Cell[303611, 6917, 1393, 23, 31, "Message"],
Cell[305007, 6942, 1042, 15, 56, "Output"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[306098, 6963, 123, 2, 64, "Section"],
Cell[306224, 6967, 1343, 29, 224, "Input"],
Cell[307570, 6998, 946, 17, 104, "Input"],
Cell[308519, 7017, 634, 13, 104, "Input"],
Cell[309156, 7032, 531, 11, 104, "Input"],
Cell[CellGroupData[{
Cell[309712, 7047, 63, 1, 55, "Input"],
Cell[309778, 7050, 2755, 43, 164, "Message"],
Cell[312536, 7095, 1465, 24, 31, "Message"],
Cell[314004, 7121, 1580, 25, 58, "Message"],
Cell[315587, 7148, 1465, 24, 31, "Message"],
Cell[317055, 7174, 1114, 16, 56, "Output"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[318218, 7196, 171, 2, 64, "Section"],
Cell[318392, 7200, 1388, 30, 224, "Input"],
Cell[319783, 7232, 849, 16, 104, "Input"],
Cell[320635, 7250, 661, 13, 104, "Input"],
Cell[321299, 7265, 631, 12, 104, "Input"],
Cell[CellGroupData[{
Cell[321955, 7281, 63, 1, 55, "Input"],
Cell[322021, 7284, 3808, 58, 296, "Message"],
Cell[325832, 7344, 1437, 23, 31, "Message"],
Cell[327272, 7369, 1552, 24, 58, "Message"],
Cell[328827, 7395, 1437, 23, 31, "Message"],
Cell[330267, 7420, 1091, 15, 56, "Output"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[331407, 7441, 169, 2, 64, "Section"],
Cell[331579, 7445, 1443, 30, 224, "Input"],
Cell[333025, 7477, 849, 16, 104, "Input"],
Cell[333877, 7495, 661, 13, 104, "Input"],
Cell[334541, 7510, 685, 13, 104, "Input"],
Cell[CellGroupData[{
Cell[335251, 7527, 63, 1, 55, "Input"],
Cell[335317, 7530, 3810, 58, 296, "Message"],
Cell[339130, 7590, 1437, 23, 31, "Message"],
Cell[340570, 7615, 1554, 24, 58, "Message"],
Cell[342127, 7641, 1437, 23, 31, "Message"],
Cell[343567, 7666, 1089, 15, 56, "Output"]
}, Open  ]]
}, Closed]]
}, Closed]]
}
]
*)

(* End of internal cache information *)
